-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hoist out line_clip and screen_draw_*
- Loading branch information
Showing
6 changed files
with
584 additions
and
509 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* line.h -- lines */ | ||
|
||
#ifndef GEOM_LINE_H | ||
#define GEOM_LINE_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
#include "geom/box.h" | ||
|
||
/// Clips the line (x0,y0)-(x1,y1) by `clip` and returns the clipped points in `x0` and co. | ||
/// | ||
/// - Parameters: | ||
/// - clip: Rectangular clip region. | ||
/// - x0: X coordinate of first point of line (in/out). | ||
/// - y0: Y coordinate of first point of line (in/out). | ||
/// - x1: X coordinate of second point of line (in/out). | ||
/// - y1: Y coordinate of second point of line (in/out). | ||
int line_clip(const box_t *clip, | ||
int *x0, | ||
int *y0, | ||
int *x1, | ||
int *y1); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* GEOM_LINE_H */ |
Oops, something went wrong.