pdfSetEMFPatternDistance
Set/get a document-global tiling-pattern hatch-line spacing
double __stdcall pdfGetEMFPatternDistance(PPDF IPDF);
BOOL32 __stdcall pdfSetEMFPatternDistance(PPDF IPDF, double Value);
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.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Value | Hatch-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)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetEMFPatternDistance
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.