THPDFLayoutMeasurement Record
The measured size of a layout element under given constraints: desired and minimum extents, split capability and the computed Fits verdict
Declaration
THPDFLayoutMeasurement= record
Width: Single;
Height: Single;
MinimumWidth: Single;
MinimumHeight: Single;
CanSplit: boolean;
Fits: boolean;
end;
Unit
HPDFDoc
Fields
| Field | Purpose |
|---|---|
Width / Height | Size the element asks for under the supplied constraints |
MinimumWidth / MinimumHeight | Smallest size the element finds acceptable; negative measurements raise a range error in MeasureLayoutElement |
CanSplit | Whether the element can be split into a placed part and an overflow part across pages |
Fits | Computed by THotPDF.MeasureLayoutElement: true when width and height fit inside the available space |
Usage notes
- Obtain it from
THotPDF.MeasureLayoutElement, which passes the constraints on to the element'sMeasureoverride and then stampsFits - Feed
FitsandCanSplitinto placement decisions: an element that does not fit but can split is placed in part byPlaceLayoutElement, one that cannot split moves on to the next page - The returned extents describe the desired size, not the final draw rectangle; placement may shrink the drawn area within the measurement