tp.Point, tp.Size and tp.Rect

tp.Point, tp.Size, and tp.Rect are small geometry value classes used throughout Tripous code. They keep coordinate and dimension calculations readable instead of passing anonymous objects or loose argument lists everywhere.

tp.Point represents X/Y. tp.Size represents Width/Height. tp.Rect combines location and size and adds common rectangle operations such as containment, intersection, union, inflation, and offsetting.

Point and size

Point and Size support simple arithmetic, comparison, clearing, and string output.

Rectangle operations

Rect supports containment, intersection, union, inflation, offsetting, and calculated Right / Bottom values.

Element rectangles

tp.BoundingRect() returns viewport-relative geometry. tp.OffsetRect() returns geometry relative to the offset parent.

Target

Factory helpers

tp.Rect.FromValue(), tp.Rect.FromArguments(), and tp.Rect.FromClientRect() normalize rectangle-like values.