Table of Contents

Class MetaDo

Namespace
iText.Kernel.Pdf.Canvas.Wmf
Assembly
itext.kernel.dll

A class to process WMF files.

public class MetaDo
Inheritance
MetaDo
Inherited Members

Remarks

A class to process WMF files. Used internally by WmfImageHelper.

Constructors

MetaDo(Stream, PdfCanvas)

Creates a MetaDo instance.

public MetaDo(Stream @in, PdfCanvas cb)

Parameters

in Stream

inputstream containing the data

cb PdfCanvas

PdfCanvas

Fields

META_ANIMATEPALETTE

public const int META_ANIMATEPALETTE = 1078

Field Value

int

META_ARC

public const int META_ARC = 2071

Field Value

int

META_BITBLT

public const int META_BITBLT = 2338

Field Value

int

META_CHORD

public const int META_CHORD = 2096

Field Value

int

META_CREATEBRUSHINDIRECT

public const int META_CREATEBRUSHINDIRECT = 764

Field Value

int

META_CREATEFONTINDIRECT

public const int META_CREATEFONTINDIRECT = 763

Field Value

int

META_CREATEPALETTE

public const int META_CREATEPALETTE = 247

Field Value

int

META_CREATEPATTERNBRUSH

public const int META_CREATEPATTERNBRUSH = 505

Field Value

int

META_CREATEPENINDIRECT

public const int META_CREATEPENINDIRECT = 762

Field Value

int

META_CREATEREGION

public const int META_CREATEREGION = 1791

Field Value

int

META_DELETEOBJECT

public const int META_DELETEOBJECT = 496

Field Value

int

META_DIBBITBLT

public const int META_DIBBITBLT = 2368

Field Value

int

META_DIBCREATEPATTERNBRUSH

public const int META_DIBCREATEPATTERNBRUSH = 322

Field Value

int

META_DIBSTRETCHBLT

public const int META_DIBSTRETCHBLT = 2881

Field Value

int

META_ELLIPSE

public const int META_ELLIPSE = 1048

Field Value

int

META_ESCAPE

public const int META_ESCAPE = 1574

Field Value

int

META_EXCLUDECLIPRECT

public const int META_EXCLUDECLIPRECT = 1045

Field Value

int

META_EXTFLOODFILL

public const int META_EXTFLOODFILL = 1352

Field Value

int

META_EXTTEXTOUT

public const int META_EXTTEXTOUT = 2610

Field Value

int

META_FILLREGION

public const int META_FILLREGION = 552

Field Value

int

META_FLOODFILL

public const int META_FLOODFILL = 1049

Field Value

int

META_FRAMEREGION

public const int META_FRAMEREGION = 1065

Field Value

int

META_INTERSECTCLIPRECT

public const int META_INTERSECTCLIPRECT = 1046

Field Value

int

META_INVERTREGION

public const int META_INVERTREGION = 298

Field Value

int

META_LINETO

public const int META_LINETO = 531

Field Value

int

META_MOVETO

public const int META_MOVETO = 532

Field Value

int

META_OFFSETCLIPRGN

public const int META_OFFSETCLIPRGN = 544

Field Value

int

META_OFFSETVIEWPORTORG

public const int META_OFFSETVIEWPORTORG = 529

Field Value

int

META_OFFSETWINDOWORG

public const int META_OFFSETWINDOWORG = 527

Field Value

int

META_PAINTREGION

public const int META_PAINTREGION = 299

Field Value

int

META_PATBLT

public const int META_PATBLT = 1565

Field Value

int

META_PIE

public const int META_PIE = 2074

Field Value

int

META_POLYGON

public const int META_POLYGON = 804

Field Value

int

META_POLYLINE

public const int META_POLYLINE = 805

Field Value

int

META_POLYPOLYGON

public const int META_POLYPOLYGON = 1336

Field Value

int

META_REALIZEPALETTE

public const int META_REALIZEPALETTE = 53

Field Value

int

META_RECTANGLE

public const int META_RECTANGLE = 1051

Field Value

int

META_RESIZEPALETTE

public const int META_RESIZEPALETTE = 313

Field Value

int

META_RESTOREDC

public const int META_RESTOREDC = 295

Field Value

int

META_ROUNDRECT

public const int META_ROUNDRECT = 1564

Field Value

int

META_SAVEDC

public const int META_SAVEDC = 30

Field Value

int

META_SCALEVIEWPORTEXT

public const int META_SCALEVIEWPORTEXT = 1042

Field Value

int

META_SCALEWINDOWEXT

public const int META_SCALEWINDOWEXT = 1040

Field Value

int

META_SELECTCLIPREGION

public const int META_SELECTCLIPREGION = 300

Field Value

int

META_SELECTOBJECT

public const int META_SELECTOBJECT = 301

Field Value

int

META_SELECTPALETTE

public const int META_SELECTPALETTE = 564

Field Value

int

META_SETBKCOLOR

public const int META_SETBKCOLOR = 513

Field Value

int

META_SETBKMODE

public const int META_SETBKMODE = 258

Field Value

int

META_SETDIBTODEV

public const int META_SETDIBTODEV = 3379

Field Value

int

META_SETMAPMODE

public const int META_SETMAPMODE = 259

Field Value

int

META_SETMAPPERFLAGS

public const int META_SETMAPPERFLAGS = 561

Field Value

int

META_SETPALENTRIES

public const int META_SETPALENTRIES = 55

Field Value

int

META_SETPIXEL

public const int META_SETPIXEL = 1055

Field Value

int

META_SETPOLYFILLMODE

public const int META_SETPOLYFILLMODE = 262

Field Value

int

META_SETRELABS

public const int META_SETRELABS = 261

Field Value

int

META_SETROP2

public const int META_SETROP2 = 260

Field Value

int

META_SETSTRETCHBLTMODE

public const int META_SETSTRETCHBLTMODE = 263

Field Value

int

META_SETTEXTALIGN

public const int META_SETTEXTALIGN = 302

Field Value

int

META_SETTEXTCHAREXTRA

public const int META_SETTEXTCHAREXTRA = 264

Field Value

int

META_SETTEXTCOLOR

public const int META_SETTEXTCOLOR = 521

Field Value

int

META_SETTEXTJUSTIFICATION

public const int META_SETTEXTJUSTIFICATION = 522

Field Value

int

META_SETVIEWPORTEXT

public const int META_SETVIEWPORTEXT = 526

Field Value

int

META_SETVIEWPORTORG

public const int META_SETVIEWPORTORG = 525

Field Value

int

META_SETWINDOWEXT

public const int META_SETWINDOWEXT = 524

Field Value

int

META_SETWINDOWORG

public const int META_SETWINDOWORG = 523

Field Value

int

META_STRETCHBLT

public const int META_STRETCHBLT = 2851

Field Value

int

META_STRETCHDIB

public const int META_STRETCHDIB = 3907

Field Value

int

META_TEXTOUT

public const int META_TEXTOUT = 1313

Field Value

int

cb

PdfCanvas of the MetaDo object.

public PdfCanvas cb

Field Value

PdfCanvas

in

The InputMeta instance containing the data.

public InputMeta @in

Field Value

InputMeta

Methods

IsNullStrokeFill(bool)

Return true if the pen style is null and if it isn't a brush.

public virtual bool IsNullStrokeFill(bool isRectangle)

Parameters

isRectangle bool

value to decide how to change the state. If true state.setLineJoinRectangle(cb) is called, if false state.setLineJoinPolygon(cb) is called.

Returns

bool

true if the pen style is null and if it isn't a brush

OutputText(int, int, int, int, int, int, int, string)

Output Text at a certain x and y coordinate.

public virtual void OutputText(int x, int y, int flag, int x1, int y1, int x2, int y2, string text)

Parameters

x int

x-coordinate

y int

y-coordinate

flag int

flag indicating clipped or opaque

x1 int

x1-coordinate of the rectangle if clipped or opaque

y1 int

y1-coordinate of the rectangle if clipped or opaque

x2 int

x2-coordinate of the rectangle if clipped or opaque

y2 int

y1-coordinate of the rectangle if clipped or opaque

text string

text to output

Remarks

Output Text at a certain x and y coordinate. Clipped or opaque text isn't supported as of yet.

ReadAll()

Reads and processes all the data of the InputMeta.

public virtual void ReadAll()

StrokeAndFill()

Stroke and fill the MetaPen and MetaBrush paths.

public virtual void StrokeAndFill()

WrapBMP(ImageData)

Wrap a BMP image in an WMF.

public static byte[] WrapBMP(ImageData image)

Parameters

image ImageData

the BMP image to be wrapped

Returns

byte[]

the wrapped BMP

WriteDWord(Stream, int)

Writes the specified value to the specified outputstream as a dword.

public static void WriteDWord(Stream os, int v)

Parameters

os Stream

outputstream to write the dword to

v int

value to be written

WriteWord(Stream, int)

Writes the specified value to the specified outputstream as a word.

public static void WriteWord(Stream os, int v)

Parameters

os Stream

outputstream to write the word to

v int

value to be written