THotPDF.RegisterLineGraphicsState

THotPDF

 

Top

Registers a reusable PDF ExtGState dictionary carrying line drawing parameters and returns the resource name used by THPDFPage.SetGraphicsState.

 

Delphi syntax:

function RegisterLineGraphicsState(LineWidth: Single; LineCap: TLineCapStyle; LineJoin: TLineJoinStyle; MiterLimit: Single): AnsiString;

 

Description

The method creates an ExtGState with /LW, /LC, /LJ, and /ML entries for line width, line cap, line join, and miter limit. The returned name is stable within the document, such as GS1, and is attached to a page's Resources/ExtGState dictionary when SetGraphicsState is called.

Use this when multiple drawing regions should share the same stroke geometry without repeating page-level setters before every path.

LineWidth and MiterLimit must be non-negative. The helper requires PDF 1.2 or later, matching the PDF ExtGState resource model. Available since HotPDF v2.121.8.