Details
struct GdkPoint
struct GdkPoint
{
gint16 x;
gint16 y;
}; |
Defines the x and y coordinates of a point.
Note that both are defined as gint16 values, so the coordinates are limited
to between -32,768 and 32,767.
struct GdkRectangle
struct GdkRectangle
{
gint16 x;
gint16 y;
guint16 width;
guint16 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
struct GdkRegion
{
gpointer user_data;
}; |
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_regions_intersect ()
Returns the intersection of two regions.
gdk_regions_union ()
Returns the union of two regions.
This is all pixels in either of source1 or source2.
gdk_regions_subtract ()
Subtracts one region from another.
The result is a region containing all the pixels which are in source1, but
which are not in source2.
gdk_regions_xor ()
Returns the difference between the union and the intersection of two regions.
This is a region containing the pixels that are in one of the source regions,
but which are not in both.
gdk_region_union_with_rect ()
Returns the union of a region and a rectangle.
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_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_get_clipbox ()
Returns the smallest rectangle which includes the entire GdkRegion.