Description Methods and Functions Detailed Description Structures Enums and Flags User Functions Author(s) References
Simple graphical data types
gdkRectangleIntersect(src1, src2)
gdkRectangleUnion(src1, src2)
gdkRegionNew()
gdkRegionPolygon(points, fill.rule)
gdkRegionCopy(object)
gdkRegionRectangle(rectangle)
gdkRegionGetClipbox(object)
gdkRegionGetRectangles(object)
gdkRegionEmpty(object)
gdkRegionEqual(object, region2)
gdkRegionRectEqual(object, rectangle)
gdkRegionPointIn(object, x, y)
gdkRegionRectIn(object, rect)
gdkRegionOffset(object, dx, dy)
gdkRegionShrink(object, dx, dy)
gdkRegionUnionWithRect(object, rect)
gdkRegionIntersect(object, source2)
gdkRegionUnion(object, source2)
gdkRegionSubtract(object, source2)
gdkRegionXor(object, source2)
gdkRegionSpansIntersectForeach(object, spans, sorted, fun, data)
GDK provides the GdkPoint
, GdkRectangle
, GdkRegion
and GdkSpan
data types
for representing pixels and sets of pixels on the screen.
GdkPoint
is a simple structure containing an x and y coordinate of a point.
GdkRectangle
is a structure holding the position and size of a rectangle.
The intersection of two rectangles can be computed with
gdkRectangleIntersect
. To find the union of two rectangles use
gdkRectangleUnion
.
GdkRegion
is an opaque data type holding a set of arbitrary pixels, and is
usually used for clipping graphical operations (see gdkGCSetClipRegion
).
GdkSpan
is a structure holding a spanline. A spanline is a horizontal line that
is one pixel wide. It is mainly used when rasterizing other graphics primitives.
It can be intersected to regions by using gdkRegionSpansIntersectForeach
.
GdkPoint
Defines the x and y coordinates of a point.
GdkPoint
is a transparent-type.
x
the x coordinate of the point.
y
the y coordinate of the point.
GdkRectangle
Defines the position and size of a rectangle.
GdkRectangle
is a transparent-type.
x
[integer] the x coordinate of the left edge of the rectangle.
y
[integer] the y coordinate of the top of the rectangle.
width
[integer] the width of the rectangle.
height
[integer] the height of the rectangle.
GdkRegion
A GdkRegion represents a set of pixels on the screen.
GdkSpan
A GdkSpan represents a horizontal line of pixels starting
at the pixel with coordinates x
, y
and ending before x
+ width
, y
.
GdkSpan
is a transparent-type.
x
[integer] x coordinate of the first pixel.
y
[integer] y coordinate of the first pixel.
width
[integer] number of pixels in the span.
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.
even-odd-rule
areas which are overlapped an odd number of times are included in the region, while areas overlapped an even number of times are not.
winding-rule
overlapping areas are always included.
GdkOverlapType
Specifies the possible values returned by gdkRegionRectIn
.
in
if the rectangle is inside the GdkRegion
.
out
if the rectangle is outside the GdkRegion
.
part
if the rectangle is partly inside the GdkRegion
.
GdkSpanFunc(span, data)
This defines the type of the function passed to
gdkRegionSpansIntersectForeach
.
span
a GdkSpan
.
data
the user data passed to gdkRegionSpansIntersectForeach
.
Derived by RGtkGen from GTK+ documentation
https://developer.gnome.org/gdk2/stable/gdk2-Points-Rectangles-and-Regions.html
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.