GlyphImageMask

Fonts, Type 3 fonts, Image handling

Description

Appends a 1-bit stencil image mask (BI /IM true ... EI) positioned at the specified glyph-space rectangle into the active Type 3 glyph program

Syntax

Delphi

Function GlyphImageMask(X, Y, Width, Height: Double; MaskWidth, MaskHeight: Integer; Const MaskData: WideString): Integer;

ActiveX

Function PDFlib::GlyphImageMask(X As Double, Y As Double, Width As Double, Height As Double, MaskWidth As Long, MaskHeight As Long, MaskData As String) As Long

DLL

int DLGlyphImageMask(int InstanceID, double X, double Y, double Width, double Height, int MaskWidth, int MaskHeight, const wchar_t* MaskData);
int DLGlyphImageMaskA(int InstanceID, double X, double Y, double Width, double Height, int MaskWidth, int MaskHeight, const char* MaskData);

Parameters

X, YLower-left origin of the mask in glyph space
Width, HeightWidth and height of the mask in glyph space
MaskWidth, MaskHeightSample dimensions of the 1-bit mask (1..4096)
MaskData1-bit mask samples supplied as a hex string, a string of 0/1 bits, or packed row-padded byte characters

Return values

1 when appended, 0 when no glyph is open or the dimensions or mask payload are invalid

Remarks

Only valid between BeginGlyph and EndGlyph; the mask is encoded with /F /AHx inside the glyph CharProc stream

See also

BeginFont, BeginGlyph, EndGlyph, EndFont, GlyphSetColor