Libraries:Gtk:Gdk:Region
Types
T
Constants
Nil : T
Functions
New() : Gtk.Gdk.Region.T
Polygon(points @ Gtk.Gdk.Point.T, n_points @ Std.Integer.SmallT, fill_rule @ Gtk.Gdk.FillRule.T) : Gtk.Gdk.Region.T
Warning
Polygon has been deprecated since version 2.22 and should not be used in newly-written code. There is no replacement. For working with paths, please use Cairo.
Rectangle(rectangle @ Gtk.Gdk.Rectangle.T) : Gtk.Gdk.Region.T
Creates a new region containing the area rectangle.
rectangle | a Gtk.Gdk.Rectangle.T |
Returns | a new region |
Methods
:"="(_ @ T, _ @ T)
:Copy(self @ T) : Gtk.Gdk.Region.T
Copies region, creating an identical new region.
region | a T |
Returns | a new region identical to region |
:Destroy(self @ T) : Std.Object.T
:Empty(self @ T) : Std.Symbol.T
:Equal(self @ T, region2 @ Gtk.Gdk.Region.T) : Std.Symbol.T
Finds out if the two regions are the same.
:GetClipbox(self @ T, rectangle @ Gtk.Gdk.Rectangle.T) : Std.Object.T
Obtains the smallest rectangle which includes the entire T.
region | a T |
rectangle | return location for the clipbox |
:GetRectangles(self @ T, rectangles @ Std.Object.T, n_rectangles @ Std.Object.T) : Std.Object.T
Obtains the area covered by the region as a list of rectangles. The array returned in rectangles must be freed with g_free().
region | a T |
rectangles | return location for an array of rectangles. [array length=n_rectangles][transfer container] |
n_rectangles | length of returned array |
:Intersect(self @ T, source2 @ Gtk.Gdk.Region.T) : Std.Object.T
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.
:Offset(self @ T, dx @ Std.Integer.SmallT, dy @ Std.Integer.SmallT) : Std.Object.T
Moves a region the specified distance.
region | a T |
dx | the distance to move the region horizontally |
dy | the distance to move the region vertically |
:PointIn(self @ T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT) : Std.Symbol.T
Finds out if a point is in a region.
region | a T |
x | the x coordinate of a point |
y | the y coordinate of a point |
Returns | TRUE if the point is in region. |
:RectEqual(self @ T, rectangle @ Gtk.Gdk.Rectangle.T) : Std.Symbol.T
Warning
RectEqual has been deprecated since version 2.22 and should not be used in newly-written code. Use gdk_region_new_rect() and Equal to achieve the same effect.
:RectIn(self @ T, rectangle @ Gtk.Gdk.Rectangle.T) : Gtk.Gdk.OverlapType.T
Tests whether a rectangle is within a region.
region | a T. |
rectangle | a Gtk.Gdk.Rectangle.T. |
Returns | Gtk.Gdk.OverlapType.In, Gtk.Gdk.OverlapType.Out, or Gtk.Gdk.OverlapType.Part, depending on whether the rectangle is inside, outside, or partly inside the T, respectively. |
:Shrink(self @ T, dx @ Std.Integer.SmallT, dy @ Std.Integer.SmallT) : Std.Object.T
Warning
Shrink has been deprecated since version 2.22 and should not be used in newly-written code. There is no replacement for this function.
:SpansIntersectForeach(self @ T, spans @ Gtk.Gdk.Span.T, n_spans @ Std.Integer.SmallT, sorted @ Std.Symbol.T, function @ Std.Function.T, data @ Std.Address.T) : Std.Object.T
Warning
SpansIntersectForeach has been deprecated since version 2.22 and should not be used in newly-written code. There is no replacement.
:Subtract(self @ T, source2 @ Gtk.Gdk.Region.T) : Std.Object.T
Subtracts the area of source2 from the area source1. The resulting area is the set of pixels contained in source1 but not in source2.
:Union(self @ T, source2 @ Gtk.Gdk.Region.T) : Std.Object.T
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.
:UnionWithRect(self @ T, rect @ Gtk.Gdk.Rectangle.T) : Std.Object.T
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.
region | a T. |
rect | a Gtk.Gdk.Rectangle.T. |
:Xor(self @ T, source2 @ Gtk.Gdk.Region.T) : Std.Object.T
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.