Details
struct GdkPoint
struct GdkPoint
{
gint x;
gint y;
}; |
Defines the x and y coordinates of a point.
struct GdkRectangle
struct GdkRectangle
{
gint x;
gint y;
gint width;
gint height;
}; |
Defines the position and size of a rectangle.
gdk_rectangle_intersect ()
Calculates the intersection of two rectangles.
gdk_rectangle_union ()
Calculates the union of two rectangles.
The union of rectangles src1 and src2 is the smallest rectangle which
includes both src1 and src2 within it.
struct GdkRegion
A GdkRegion represents a set of pixels on the screen.
The only user-visible field of the structure is the user_data member, which
can be used to attach arbitrary data to the GdkRegion.
gdk_region_new ()
Creates a new empty GdkRegion.
gdk_region_polygon ()
Creates a new GdkRegion using the polygon defined by a number of points.
enum GdkFillRule
typedef enum
{
GDK_EVEN_ODD_RULE,
GDK_WINDING_RULE
} GdkFillRule; |
The method for determining which pixels are included in a region, when
creating a GdkRegion from a polygon.
The fill rule is only relevant for polygons which overlap themselves.
gdk_region_copy ()
Copies region, creating an identical new region.
gdk_region_rectangle ()
Creates a new region containing the area rectangle.
gdk_region_get_clipbox ()
Returns the smallest rectangle which includes the entire GdkRegion.
gdk_region_get_rectangles ()
Obtains the area covered by the region as a list of rectangles.
The array returned in rectangles must be freed with g_free().
gdk_region_empty ()
Returns TRUE if the GdkRegion is empty.
gdk_region_equal ()
Returns TRUE if the two regions are the same.
gdk_region_point_in ()
Returns TRUE if a point is in a region.
gdk_region_rect_in ()
Tests whether a rectangle is within a region.
enum GdkOverlapType
typedef enum
{
GDK_OVERLAP_RECTANGLE_IN,
GDK_OVERLAP_RECTANGLE_OUT,
GDK_OVERLAP_RECTANGLE_PART
} GdkOverlapType; |
Specifies the possible values returned by gdk_region_rect_in().
gdk_region_offset ()
Moves a region the specified distance.
gdk_region_shrink ()
Resizes a region by the specified amount.
Positive values shrink the region. Negative values expand it.
gdk_region_union_with_rect ()
Sets the area of region to the union of the areas of region and
rect. The resulting area is the set of pixels contained in
either region or rect.
gdk_region_intersect ()
Converts source1 into the intersection between source1 and source2.
That is, after calling this function source2 will be unchanged and
source1 will be the areas the two regions have in common.
Sets the area of source1 to the intersection of the areas of source1
and source2. The resulting area is the set of pixels contained in
both source1 and source2.
gdk_region_union ()
Sets the area of source1 to the union of the areas of source1 and
source2. The resulting area is the set of pixels contained in
either source1 or source2.
gdk_region_subtract ()
Subtracts any area in source2 from the area in source1.
Subtracts the area of source2 from the area source1. The resulting
area is the set of pixels contained in source1 but not in source2.
gdk_region_xor ()
XORs the two regions, placing the result in source1. The XOR of two
regions contains all areas which were not overlapping. That is,
it's the union of the regions minus the intersection of the
regions.
Sets the area of source1 to the exclusive-OR of the areas of source1
and source2. The resulting area is the set of pixels contained in one
or the other of the two sources but not in both.
struct GdkSpan
struct GdkSpan
{
gint x;
gint y;
gint width;
}; |
A GdkSpan represents a horizontal line of pixels starting
at the pixel with coordinates x, y and ending before x + width, y.
gdk_region_spans_intersect_foreach ()
Calls a function on each span in the intersection of region and
spans.