SetGraphicsState
Vector graphics, Text, Page layout
Description
Applies a reusable graphics-state ID created by NewGraphicsState to the current content stream so subsequent drawing uses that ExtGState. The setting applies to the selected page only and is not carried over to another page.
Syntax
Delphi
Function TPDFlib.SetGraphicsState(GraphicsStateID: Integer): Integer;
ActiveX
Function PDFlib::SetGraphicsState(GraphicsStateID As Long) As Long
DLL
int DLSetGraphicsState(int InstanceID, int GraphicsStateID);
Parameters
| GraphicsStateID | The reusable graphics-state ID returned by NewGraphicsState for the selected document |
|---|
Return values
| 0 | The ID is invalid or was not created for the selected document |
|---|---|
| 1 | The graphics state was applied to the current content stream |
Remarks
The method registers the ExtGState in the current page resources and writes the PDF gs operator to the active content stream
Call SaveState before applying a reusable graphics state and LoadState afterwards when the change should be limited to a drawing block