Details
GrNewRegion ()
GR_REGION_ID GrNewRegion (void); |
Creates a new region structure and returns the ID used to refer to it.
The structure is initialised with a set of default parameters.
GrDestroyRegion ()
void GrDestroyRegion (GR_REGION_ID region); |
Destroys the region structure with the specified ID.
GrUnionRectWithRegion ()
void GrUnionRectWithRegion (GR_REGION_ID region,
GR_RECT *rect); |
Makes a union of the specified region and the specified rectangle and
places the result back in the source region.
GrUnionRegion ()
void GrUnionRegion (GR_REGION_ID dst_rgn,
GR_REGION_ID src_rgn1,
GR_REGION_ID src_rgn2); |
Makes a union of the specified source regions and places the result in the
specified destination region.
GrSubtractRegion ()
void GrSubtractRegion (GR_REGION_ID dst_rgn,
GR_REGION_ID src_rgn1,
GR_REGION_ID src_rgn2); |
Subtracts the second source region from the first source region and places
the result in the specified destination region.
GrXorRegion ()
void GrXorRegion (GR_REGION_ID dst_rgn,
GR_REGION_ID src_rgn1,
GR_REGION_ID src_rgn2); |
Performs a logical exclusive OR operation on the specified source regions
and places the result in the destination region. The destination region
will contain only the parts of the source regions which do not overlap.
GrIntersectRegion ()
void GrIntersectRegion (GR_REGION_ID dst_rgn,
GR_REGION_ID src_rgn1,
GR_REGION_ID src_rgn2); |
Calculates the intersection of the two specified source regions and places
the result in the specified destination region. The destination region
will contain only the parts of the source regions which overlap each other.
GrSetGCRegion ()
void GrSetGCRegion (GR_GC_ID gc,
GR_REGION_ID region); |
Sets the clip mask of the specified graphics context to the specified
region. Subsequent drawing operations using this graphics context will not
draw outside the specified region. The region ID can be set to 0 to remove
the clipping region from the specified graphics context.
GrPointInRegion ()
GR_BOOL GrPointInRegion (GR_REGION_ID region,
GR_COORD x,
GR_COORD y); |
Tests whether the specified point is within the specified region, and
then returns either True or False depending on the result.
GrRectInRegion ()
int GrRectInRegion (GR_REGION_ID region,
GR_COORD x,
GR_COORD y,
GR_COORD w,
GR_COORD h); |
Tests whether the specified rectangle is contained within the specified
region. Returns GR_RECT_OUT if it is not inside it at all, GR_RECT_ALLIN
if it is completely contained within the region, or GR_RECT_PARTIN if
it is partially contained within the region.
GrEmptyRegion ()
GR_BOOL GrEmptyRegion (GR_REGION_ID region); |
Determines whether the specified region is empty, and returns GR_TRUE
if it is, or GR_FALSE otherwise.
GrEqualRegion ()
GR_BOOL GrEqualRegion (GR_REGION_ID rgn1,
GR_REGION_ID rgn2); |
Determines whether the specified regions are identical, and returns GR_TRUE
if it is, or GR_FALSE otherwise.
GrOffsetRegion ()
void GrOffsetRegion (GR_REGION_ID region,
GR_SIZE dx,
GR_SIZE dy); |
Offsets the specified region by the specified distance.
GrGetRegionBox ()
int GrGetRegionBox (GR_REGION_ID region,
GR_RECT *rect); |
Fills in the specified rectangle structure with a bounding box that would
completely enclose the specified region, and also returns the type of the
specified region.
GrNewPolygonRegion ()
GR_REGION_ID GrNewPolygonRegion (int mode,
GR_COUNT count,
GR_POINT *points); |
Creates a new region structure, fills it with the region described by the
specified polygon, and returns the ID used to refer to it.