Tickit::RectSet(3pm)
π NAME π
Straight out of the User Contributed Perl Documentation, bestie: this is Tickit::RectSet from the 3pm manual β the icon of storing a set of rectangular regions. Slay. β¨
πΈ DESCRIPTION πΈ
Okay so picture this: objects in this class store a set of rectangular regions. The object is lowkey tracking which areas are covered, so overlaps are avoided and neighbouring regions get merged where possible. It's giving organized queen energy. π
And the order in which regions are added? Not important. Periodt.
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. Obsessed with a consistent layout. π
π CONSTRUCTOR π
β¨ new β¨
$rectset = Tickit::RectSet->new
Returns a new Tickit::RectSet instance, initially empty. A fresh start, main character energy only. π¦
π¦ METHODS π¦
β rects β
@rects = $rectset->rects
Returns a list of the covered regions, in order first top to bottom, then left to right. The way it keeps things sorted? Iconic. π
β add β
$rectset->add( $rect )
Adds the region covered by $rect to the stored region list. Come through, new region. π₯
β subtract β
$rectset->subtract( $rect )
Removes any covered region that intersects with $rect from the stored region list. Not me deleting the overlap, but make it make sense. π
β clear β
$rectset->clear
Remove all the regions from the set. Wipe the slate clean, no cap. π
β intersects β
$bool = $rectset->intersects( $rect )
Returns true if $rect intersects with any region in the set. Vibe check: did they touch? π
β contains β
$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. So yes, bestie β teamwork makes the dream work. π«Ά
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk>
And that's the whole manual page, bestie. This absolute gem comes from perl v5.42.3, dated 2026-08-19, and it's the Tickit::RectSet(3pm) page. Go forth and store those rectangles. ππ
π¦ where this page comes from
- ubuntu stonking: libtickit-perl 0.73-1build5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms