PGFRect(3)
π PGFRect(3) β the rectangle glow-up π
okay bestie, we're deep in libpgf territory and this is PGFRect, the humble little rectangle struct that's honestly carrying the whole geometry department. it's a rect. it has corners. it knows things. periodt.
β¨ NAME β¨
PGFRect β Rectangle. that's it, that's the name. a rectangle. iconic behavior honestly π
π¦ SYNOPSIS π¦
#include <PGFtypes.h>
πΈ Public Member Functions πΈ
PGFRect ()β the standard constructor, aka the blank-slate era β¨PGFRect (UINT32 x, UINT32 y, UINT32 width, UINT32 height)UINT32 Width () constUINT32 Height () constbool IsInside (UINT32 x, UINT32 y) const
π Public Attributes π
UINT32 leftUINT32 topUINT32 rightUINT32 bottom
π Detailed Description π
Rectangle.
Rectangle.
likeβ¦ rectangle. that's the whole vibe. it's giving four sides, four corners, main character energy in the geometry world π
Author β C. Stamm
Definition at line 225 of file PGFtypes.h.
π§ Constructor & Destructor Documentation π§
PGFRect::PGFRect () [inline]
Standard constructor. she starts from zero, as one does π«Ά
Definition at line 229 of file PGFtypes.h.
229 : left(0), top(0), right(0), bottom(0) {}
not me being obsessed with a constructor that just zeroes everything out. lowkey perfect. everything's 0, nothing's complicated, we love a clean slate π
PGFRect::PGFRect (UINT32 x, UINT32 y, UINT32 width, UINT32 height) [inline]
Constructor β the "here's exactly where I want my rectangle bestie" version.
Parameters
- x β Left offset
- y β Top offset
- width β Rectangle width
- height β Rectangle height
Definition at line 236 of file PGFtypes.h.
236 : left(x), top(y), right(x + width), bottom(y + height) {}
see how it does the math for you?? you hand it a corner and a size, it hands you backrightandbottomalready computed. ate and left no crumbs π₯
β Member Function Documentation β
UINT32 PGFRect::Height () const [inline]
Returns β Rectangle height
Definition at line 259 of file PGFtypes.h.
259 { return bottom - top; }
justbottomminustop. simple math, no notes π
bool PGFRect::IsInside (UINT32 x, UINT32 y) const [inline]
Test if point (x,y) is inside this rectangle (inclusive top-left edges, exclusive bottom-right edges)
Parameters
- x β Point coordinate x
- y β Point coordinate y
Returns β True if point (x,y) is inside this rectangle (inclusive top-left edges, exclusive bottom-right edges)
Definition at line 265 of file PGFtypes.h.
265 { return (x >= left && x < right && y >= top && y < bottom); }
okay this one's important so listen up bestie: the top-left edges are inclusive (the>=and<are doing the heavy lifting) and the bottom-right edges are exclusive. so a point sitting exactly onleftortop? inside. a point sitting exactly onrightorbottom? not inside. iykyk πΈ
UINT32 PGFRect::Width () const [inline]
Returns β Rectangle width
Definition at line 256 of file PGFtypes.h.
256 { return right - left; }
rightminusleft. symmetrical queen π
π Member Data Documentation π
UINT32 PGFRect::bottomβ Definition at line 226 of filePGFtypes.h.UINT32 PGFRect::leftβ Definition at line 226 of filePGFtypes.h.UINT32 PGFRect::rightβ Definition at line 226 of filePGFtypes.h.UINT32 PGFRect::topβ Definition at line 226 of filePGFtypes.h.
four UINT32s, all declared at line 226, all living their best life. the gang's all here π
π Author π
Generated automatically by Doxygen for libpgf from the source code.
and that's the whole page, bestie!! π this lil rectangle doc came straight from libpgf version 7.21.2, dated Thu Jul 24 2025 00:00:00, and yes it really does call itself PGFRect(3). go forth and draw rectangles responsibly πβ¨π¦
π¦ where this page comes from
- fedora 43: libpgf-devel 7.21.7-8.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: libpgf-devel 7.21.7-8.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms