![]() |
![]() |
![]() |
Geoc (geocanvas) Reference Manual | |
---|---|---|---|---|
#define GEOC_TYPE_CLIP #define GEOC_TYPE_PIPELINE GeocPipeline; GeocClip; GeocClip* geoc_clip_new (gboolean open, double x1, double y1, double x2, double y2); void geoc_clip_add_point (GeocClip *clip, double x, double y); void geoc_clip_finish (GeocClip *clip); void geoc_clip_free (GeocClip *clip); GType geoc_clip_get_type (void); GType geoc_pipeline_get_type (void);
typedef struct { GeocPipeline left, top, right, bot; gboolean open; CrPoints *points; } GeocClip;
GeocClip* geoc_clip_new (gboolean open, double x1, double y1, double x2, double y2);
Initializes a structure to be used for pipeline clipping of a polyline or polygon to a rectangle.
|
If this is an open or closed shape. |
|
The leftmost coordinate of the clipping rectangle. |
|
The topmost coordinate of the clipping rectangle. |
|
The rightmost coordinate of the clipping rectangle. |
|
The bottommost coordinate of the clipping rectangle. |
Returns : |
A new GeocClip structure to be used for point clipping. |
void geoc_clip_add_point (GeocClip *clip, double x, double y);
Add an additional point to the shape to be clipped. Call this routine until all points are added.
|
|
|
The x-coordinate of the next point in the shape. |
|
The y-coordinate of the next point in the shape. |
void geoc_clip_finish (GeocClip *clip);
Tells the clipping algorithm that we are at the end of the pipeline. That is, all points have been added.
|
void geoc_clip_free (GeocClip *clip);
Use this to free the filled GeocClip structure.
|