Gtk2::Gdk::Region3pm
Wrapper for gdkregion
Hierarchy
Glib::Boxed+----Gtk2::Gdk::Region
Methods
region = Gtk2::Gdk::Region->new
rectangle = $region->get_clipbox
boolean = $region->empty
boolean = $region1->equal ($region2)
- •
-
$region2(Gtk2::Gdk::Region)
$source1->intersect ($source2)
- •
-
$source2(Gtk2::Gdk::Region)
$region->offset ($dx, $dy)
•
|
|
|---|---|
•
|
|
boolean = $region->point_in ($x, $y)
•
|
|
|---|---|
•
|
|
region = Gtk2::Gdk::Region->polygon ($points_ref, $fill_rule)
•
|
|
|---|---|
•
|
|
boolean = $region->rect_equal ($rectangle)
- •
-
$rectangle(Gtk2::Gdk::Rectangle)
Since: gtk+ 2.18
overlaptype = $region->rect_in ($rect)
- •
-
$rect(Gtk2::Gdk::Rectangle)
region = Gtk2::Gdk::Region->rectangle ($rectangle)
- •
-
$rectangle(Gtk2::Gdk::Rectangle)
list = $region->get_rectangles
Returns a list of rectangles (Gtk2::Gdk::Rectangle's), the area covered by the region.
$region->shrink ($dx, $dy)
•
|
|
|---|---|
•
|
|
$region->spans_intersect_foreach ($spans_ref, $sorted, $func, $data=undef)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
Call $function for horizontal lines which intersect $region.
$spans_ref is an arrayref of x,y,width horizontal lines. If $sorted is true then they're assumed to be sorted by increasing y coordinate (allowing a single pass across the region rectangles). $function is called
&$function ($x, $y, $width, $data)
for each portion of a span which intersects $region. $function must not change $region.
$region->spans_intersect_foreach ([ 0,0,50, 20,20,100, 0,10,50 ],0, # spans not sorted by y\&my_callback,'hello'); # userdatasub my_callback {my ($x, $y, $width, $userdata) = @_;print "$userdata: $x, $y, $width\n";}
$source1->subtract ($source2)
- •
-
$source2(Gtk2::Gdk::Region)
$source1->union ($source2)
- •
-
$source2(Gtk2::Gdk::Region)
$region->union_with_rect ($rect)
- •
-
$rect(Gtk2::Gdk::Rectangle)
$source1->xor ($source2)
- •
-
$source2(Gtk2::Gdk::Region)
Enums and flags
enum Gtk2::Gdk::FillRule
•
|
'even-odd-rule' / 'GDK_EVEN_ODD_RULE' |
|---|---|
•
|
'winding-rule' / 'GDK_WINDING_RULE' |
enum Gtk2::Gdk::OverlapType
•
|
'in' / 'GDK_OVERLAP_RECTANGLE_IN' |
|---|---|
•
|
'out' / 'GDK_OVERLAP_RECTANGLE_OUT' |
•
|
'part' / 'GDK_OVERLAP_RECTANGLE_PART' |
Releases
7 releases since Debian 3.1 (Sarge); the text changed 6 times.