API referenceGraphics

pdfSetEMFPatternDistance

Set/get a document-global tiling-pattern hatch-line spacing

C
double __stdcall pdfGetEMFPatternDistance(PPDF IPDF);
BOOL32 __stdcall pdfSetEMFPatternDistance(PPDF IPDF, double Value);
Delphi
function pdfGetEMFPatternDistance(const IPDF: PPDF): Double; stdcall;
function pdfSetEMFPatternDistance(const IPDF: PPDF; Value: Double): LongBool; stdcall;

Purpose. Set/get a document-global tiling-pattern hatch-line spacing value used specifically when importing EMF (Enhanced Metafile) content that itself uses GDI hatch brushes.

Description. Straightforward cache pair (FEMFPatternDist); consulted by the EMF-import path (not part of this chapter) when translating a GDI HS_* hatch brush fill into an equivalent PDF tiling pattern, controlling the spacing between hatch lines in the generated pattern. Unlike several other document-global "appearance" setters found earlier in this volume (pdfSetOpacity, pdfSetIconColor, pdfSetDrawDirection), this one is consulted by real code — but only within the EMF-import pipeline, not by any of the direct drawing/shape APIs in this manual.

Parameters.

ParameterDescription
IPDFDocument handle.
ValueHatch-line spacing (in points) to use for subsequently-imported EMF hatch fills.

Return value. pdfSetEMFPatternDistance: True if IPDF is valid. pdfGetEMFPatternDistance: the current value; 0.0 if IPDF invalid or never set.

C# (P/Invoke)

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

Setters

Exported names

pdfSetEMFPatternDistance

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.