
@c %start of fragment

@deftp Class <gdk-rectangle>
Derives from @code{<gboxed>}.

@end deftp

@deftp Class <gdk-region>
Opaque pointer.

@end deftp

@deffn Function gdk-region-new  @result{}@tie{} (ret@tie{}@code{<gdk-region>})
Creates a new empty @code{<gdk-region>}.

@table @var
@item ret
a new empty @code{<gdk-region>}

@end table

@end deffn

@deffn Function gdk-region-copy  (self@tie{}@code{<gdk-region>}) @result{}@tie{} (ret@tie{}@code{<gdk-region>})
Copies @var{region}, creating an identical new region.

@table @var
@item region
a @code{<gdk-region>}

@item ret
a new region identical to @var{region}

@end table

@end deffn

@deffn Function gdk-region-rectangle  (rectangle@tie{}@code{<gdk-rectangle>}) @result{}@tie{} (ret@tie{}@code{<gdk-region>})
Creates a new region containing the area @var{rectangle}.

@table @var
@item rectangle
a @code{<gdk-rectangle>}

@item ret
a new region

@end table

@end deffn

@deffn Function gdk-region-destroy  (self@tie{}@code{<gdk-region>})
Destroys a @code{<gdk-region>}.

@table @var
@item region
a @code{<gdk-region>}

@end table

@end deffn

@deffn Function gdk-region-empty  (self@tie{}@code{<gdk-region>}) @result{}@tie{} (ret@tie{}@code{bool})
Finds out if the @code{<gdk-region>} is empty.

@table @var
@item region
a @code{<gdk-region>}

@item ret
@samp{@code{#t}} if @var{region} is empty.

@end table

@end deffn

@deffn Function gdk-region-equal  (self@tie{}@code{<gdk-region>}) (region2@tie{}@code{<gdk-region>}) @result{}@tie{} (ret@tie{}@code{bool})
Finds out if the two regions are the same.

@table @var
@item region1
a @code{<gdk-region>}

@item region2
a @code{<gdk-region>}

@item ret
@samp{@code{#t}} if @var{region1} and @var{region2} are equal.

@end table

@end deffn

@deffn Function gdk-region-point-in  (self@tie{}@code{<gdk-region>}) (x@tie{}@code{int}) (y@tie{}@code{int}) @result{}@tie{} (ret@tie{}@code{bool})
Finds out if a point is in a region.

@table @var
@item region
a @code{<gdk-region>}

@item x
the x coordinate of a point

@item y
the y coordinate of a point

@item ret
@samp{@code{#t}} if the point is in @var{region}.

@end table

@end deffn

@deffn Function gdk-region-rect-in  (self@tie{}@code{<gdk-region>}) (rectangle@tie{}@code{<gdk-rectangle>}) @result{}@tie{} (ret@tie{}@code{<gdk-overlap-type>})
Tests whether a rectangle is within a region.

@table @var
@item region
a @code{<gdk-region>}.

@item rectangle
a @code{<gdk-rectangle>}.

@item ret
@samp{GDK_OVERLAP_RECTANGLE_IN}, @samp{GDK_OVERLAP_RECTANGLE_OUT}, or
@samp{GDK_OVERLAP_RECTANGLE_PART}, depending on whether the rectangle is inside,
outside, or partly inside the @code{<gdk-region>}, respectively.

@end table

@end deffn

@deffn Function gdk-region-offset  (self@tie{}@code{<gdk-region>}) (dx@tie{}@code{int}) (dy@tie{}@code{int})
Moves a region the specified distance.

@table @var
@item region
a @code{<gdk-region>}

@item dx
the distance to move the region horizontally

@item dy
the distance to move the region vertically

@end table

@end deffn

@deffn Function gdk-region-shrink  (self@tie{}@code{<gdk-region>}) (dx@tie{}@code{int}) (dy@tie{}@code{int})
Resizes a region by the specified amount. Positive values shrink the region.
Negative values expand it.

@table @var
@item region
a @code{<gdk-region>}

@item dx
the number of pixels to shrink the region horizontally

@item dy
the number of pixels to shrink the region vertically

@end table

@end deffn

@deffn Function gdk-region-union-with-rect  (self@tie{}@code{<gdk-region>}) (rect@tie{}@code{<gdk-rectangle>})
Sets the area of @var{region} to the union of the areas of @var{region} and
@var{rect}. The resulting area is the set of pixels contained in either
@var{region} or @var{rect}.

@table @var
@item region
a @code{<gdk-region>}.

@item rect
a @code{<gdk-rectangle>}.

@end table

@end deffn

@deffn Function gdk-region-intersect  (self@tie{}@code{<gdk-region>}) (source2@tie{}@code{<gdk-region>})
Sets the area of @var{source1} to the intersection of the areas of @var{source1}
and @var{source2}. The resulting area is the set of pixels contained in both
@var{source1} and @var{source2}.

@table @var
@item source1
a @code{<gdk-region>}

@item source2
another @code{<gdk-region>}

@end table

@end deffn

@deffn Function gdk-region-union  (self@tie{}@code{<gdk-region>}) (source2@tie{}@code{<gdk-region>})
Sets the area of @var{source1} to the union of the areas of @var{source1} and
@var{source2}. The resulting area is the set of pixels contained in either
@var{source1} or @var{source2}.

@table @var
@item source1
a @code{<gdk-region>}

@item source2
a @code{<gdk-region>}

@end table

@end deffn

@deffn Function gdk-region-subtract  (self@tie{}@code{<gdk-region>}) (source2@tie{}@code{<gdk-region>})
Subtracts the area of @var{source2} from the area @var{source1}. The resulting
area is the set of pixels contained in @var{source1} but not in @var{source2}.

@table @var
@item source1
a @code{<gdk-region>}

@item source2
another @code{<gdk-region>}

@end table

@end deffn

@deffn Function gdk-region-xor  (self@tie{}@code{<gdk-region>}) (source2@tie{}@code{<gdk-region>})
Sets the area of @var{source1} to the exclusive-OR of the areas of @var{source1}
and @var{source2}. The resulting area is the set of pixels contained in one or
the other of the two sources but not in both.

@table @var
@item source1
a @code{<gdk-region>}

@item source2
another @code{<gdk-region>}

@end table

@end deffn


@c %end of fragment
