API referenceText

pdfInitExtGState

Initialize a TPDFExtGState record to sensible defaults before

CategoryExtended graphics state

Purpose — Initialize a TPDFExtGState record to sensible defaults before customizing and passing it to pdfCreateExtGState.

Description — Zero-fills the record, then sets FillAlpha=1.0, StrokeAlpha=1.0, BlendMode=bmNormal, SoftMaskNone=TRUE. Every other field (overprint, rendering intent, flatness/smoothness tolerances, etc.) starts at 0, which pdfCreateExtGState treats as "not set" via its own sentinel logic (see that entry, not in this chapter's scope, for the -1 "unset" convention it applies).

Declarations

C
BOOL32 __stdcall pdfInitExtGState(TPDFExtGState* GS);
Delphi
function pdfInitExtGState(var GS: TPDFExtGState): LongBool; stdcall; external 'LumasPdf.dll';

TPDFExtGState:

Delphi
TPDFExtGState = record
  AutoStrokeAdjust: Cardinal;
  BlendMode:        TBlendMode;
  FlatnessTol:      Single;
  OverPrintFill:    Cardinal;
  OverPrintStroke:  Cardinal;
  OverPrintMode:    Cardinal;
  RenderingIntent:  TRenderingIntent;
  SmoothnessTol:    Single;
  FillAlpha:        Single;
  StrokeAlpha:      Single;
  AlphaIsShape:     Cardinal;
  TextKnockout:     Cardinal;
  SoftMaskNone:     LongBool;
  SoftMask:         Pointer;
  Reserved1..7:     Pointer;   // unused
end;

Parameters

ParameterTypeDescription
GSTPDFExtGState*Record to initialize (no IPDF parameter — a pure local memory operation).

Return valueTRUE; FALSE only if GS is NULL.

See alsopdfCreateExtGState (V03), pdfSetExtGState

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Text
Category

Core

Exported names

pdfInitExtGState

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.