Interface ILayoutElement
Represents a layout element that exposes its geometric bounds in document coordinates.
public interface ILayoutElement
Examples
Example: Access bounds from any layout element.
using LMKit.Document.Layout;
using LMKit.Document.Pdf;
using LMKit.Graphics.Geometry;
PdfInfo info = PdfInfo.Load("document.pdf");
PageElement page = info.Pages[0].GetLayout();
// PageElement, TextElement, LineElement, ParagraphElement all implement ILayoutElement.
ILayoutElement element = page;
Quadrilateral bounds = element.Bounds;
Console.WriteLine($"Bounds: Left={bounds.Left:F1}, Top={bounds.Top:F1}, " +
$"Width={bounds.Width:F1}, Height={bounds.Height:F1}");
Properties
- Bounds
The element's oriented (possibly rotated) bounds.