GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Tickit::RectSet(3) User Contributed Perl Documentation Tickit::RectSet(3)

"Tickit::RectSet" - store a set of rectangular regions

Objects in this class store a set of rectangular regions. The object tracks which areas are covered, to ensure that overlaps are avoided, and that neighbouring regions are merged where possible. The order in which they are added is not important.

New regions can be added using the "add" method. The "rects" method returns a list of non-overlapping Tickit::Rect regions, in top-to-bottom, left-to-right order.

   $rectset = Tickit::RectSet->new

Returns a new "Tickit::RectSet" instance, initially empty.

   @rects = $rectset->rects

Returns a list of the covered regions, in order first top to bottom, then left to right.

   $rectset->add( $rect )

Adds the region covered by $rect to the stored region list.

   $rectset->subtract( $rect )

Removes any covered region that intersects with $rect from the stored region list.

   $rectset->clear

Remove all the regions from the set.

   $bool = $rectset->intersects( $rect )

Returns true if $rect intersects with any region in the set.

   $bool = $rectset->contains( $rect )

Returns true if $rect is entirely covered by the regions in the set. Note that it may be that the rect requires two or more regions in the set to completely cover it.

Paul Evans <leonerd@leonerd.org.uk>
2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.