iText 8.0.5 API
iText.Kernel.Pdf.Canvas.Wmf.MetaDo Class Reference

A class to process WMF files. More...

Public Member Functions

  MetaDo (Stream @in, PdfCanvas cb)
  Creates a MetaDo instance. More...
 
virtual void  ReadAll ()
  Reads and processes all the data of the InputMeta. More...
 
virtual void  OutputText (int x, int y, int flag, int x1, int y1, int x2, int y2, String text)
  Output Text at a certain x and y coordinate. More...
 
virtual bool  IsNullStrokeFill (bool isRectangle)
  Return true if the pen style is null and if it isn't a brush. More...
 
virtual void  StrokeAndFill ()
  Stroke and fill the MetaPen and MetaBrush paths. More...
 

Static Public Member Functions

static byte[]  WrapBMP (ImageData image)
  Wrap a BMP image in an WMF. More...
 
static void  WriteWord (Stream os, int v)
  Writes the specified value to the specified outputstream as a word. More...
 
static void  WriteDWord (Stream os, int v)
  Writes the specified value to the specified outputstream as a dword. More...
 

Public Attributes

PdfCanvas  cb
  PdfCanvas of the MetaDo object. More...
 
InputMeta  in
  The InputMeta instance containing the data. More...
 

Static Public Attributes

const int  META_SETBKCOLOR = 0x0201
 
const int  META_SETBKMODE = 0x0102
 
const int  META_SETMAPMODE = 0x0103
 
const int  META_SETROP2 = 0x0104
 
const int  META_SETRELABS = 0x0105
 
const int  META_SETPOLYFILLMODE = 0x0106
 
const int  META_SETSTRETCHBLTMODE = 0x0107
 
const int  META_SETTEXTCHAREXTRA = 0x0108
 
const int  META_SETTEXTCOLOR = 0x0209
 
const int  META_SETTEXTJUSTIFICATION = 0x020A
 
const int  META_SETWINDOWORG = 0x020B
 
const int  META_SETWINDOWEXT = 0x020C
 
const int  META_SETVIEWPORTORG = 0x020D
 
const int  META_SETVIEWPORTEXT = 0x020E
 
const int  META_OFFSETWINDOWORG = 0x020F
 
const int  META_SCALEWINDOWEXT = 0x0410
 
const int  META_OFFSETVIEWPORTORG = 0x0211
 
const int  META_SCALEVIEWPORTEXT = 0x0412
 
const int  META_LINETO = 0x0213
 
const int  META_MOVETO = 0x0214
 
const int  META_EXCLUDECLIPRECT = 0x0415
 
const int  META_INTERSECTCLIPRECT = 0x0416
 
const int  META_ARC = 0x0817
 
const int  META_ELLIPSE = 0x0418
 
const int  META_FLOODFILL = 0x0419
 
const int  META_PIE = 0x081A
 
const int  META_RECTANGLE = 0x041B
 
const int  META_ROUNDRECT = 0x061C
 
const int  META_PATBLT = 0x061D
 
const int  META_SAVEDC = 0x001E
 
const int  META_SETPIXEL = 0x041F
 
const int  META_OFFSETCLIPRGN = 0x0220
 
const int  META_TEXTOUT = 0x0521
 
const int  META_BITBLT = 0x0922
 
const int  META_STRETCHBLT = 0x0B23
 
const int  META_POLYGON = 0x0324
 
const int  META_POLYLINE = 0x0325
 
const int  META_ESCAPE = 0x0626
 
const int  META_RESTOREDC = 0x0127
 
const int  META_FILLREGION = 0x0228
 
const int  META_FRAMEREGION = 0x0429
 
const int  META_INVERTREGION = 0x012A
 
const int  META_PAINTREGION = 0x012B
 
const int  META_SELECTCLIPREGION = 0x012C
 
const int  META_SELECTOBJECT = 0x012D
 
const int  META_SETTEXTALIGN = 0x012E
 
const int  META_CHORD = 0x0830
 
const int  META_SETMAPPERFLAGS = 0x0231
 
const int  META_EXTTEXTOUT = 0x0a32
 
const int  META_SETDIBTODEV = 0x0d33
 
const int  META_SELECTPALETTE = 0x0234
 
const int  META_REALIZEPALETTE = 0x0035
 
const int  META_ANIMATEPALETTE = 0x0436
 
const int  META_SETPALENTRIES = 0x0037
 
const int  META_POLYPOLYGON = 0x0538
 
const int  META_RESIZEPALETTE = 0x0139
 
const int  META_DIBBITBLT = 0x0940
 
const int  META_DIBSTRETCHBLT = 0x0b41
 
const int  META_DIBCREATEPATTERNBRUSH = 0x0142
 
const int  META_STRETCHDIB = 0x0f43
 
const int  META_EXTFLOODFILL = 0x0548
 
const int  META_DELETEOBJECT = 0x01f0
 
const int  META_CREATEPALETTE = 0x00f7
 
const int  META_CREATEPATTERNBRUSH = 0x01F9
 
const int  META_CREATEPENINDIRECT = 0x02FA
 
const int  META_CREATEFONTINDIRECT = 0x02FB
 
const int  META_CREATEBRUSHINDIRECT = 0x02FC
 
const int  META_CREATEREGION = 0x06FF
 

Detailed Description

A class to process WMF files.

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

Constructor & Destructor Documentation

◆ MetaDo()

iText.Kernel.Pdf.Canvas.Wmf.MetaDo.MetaDo ( Stream @  in,
PdfCanvas  cb 
)
inline

Creates a MetaDo instance.

Parameters
in inputstream containing the data
cb PdfCanvas

Member Function Documentation

◆ IsNullStrokeFill()

virtual bool iText.Kernel.Pdf.Canvas.Wmf.MetaDo.IsNullStrokeFill ( bool  isRectangle )
inlinevirtual

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

Parameters
isRectangle value to decide how to change the state. If true state.setLineJoinRectangle(cb) is called, if false state.setLineJoinPolygon(cb) is called.
Returns
true if the pen style is null and if it isn't a brush

◆ OutputText()

virtual void iText.Kernel.Pdf.Canvas.Wmf.MetaDo.OutputText ( int  x,
int  y,
int  flag,
int  x1,
int  y1,
int  x2,
int  y2,
String  text 
)
inlinevirtual

Output Text at a certain x and y coordinate.

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

Parameters
x x-coordinate
y y-coordinate
flag flag indicating clipped or opaque
x1 x1-coordinate of the rectangle if clipped or opaque
y1 y1-coordinate of the rectangle if clipped or opaque
x2 x2-coordinate of the rectangle if clipped or opaque
y2 y1-coordinate of the rectangle if clipped or opaque
text text to output

◆ ReadAll()

virtual void iText.Kernel.Pdf.Canvas.Wmf.MetaDo.ReadAll ( )
inlinevirtual

Reads and processes all the data of the InputMeta.

◆ StrokeAndFill()

virtual void iText.Kernel.Pdf.Canvas.Wmf.MetaDo.StrokeAndFill ( )
inlinevirtual

Stroke and fill the MetaPen and MetaBrush paths.

◆ WrapBMP()

static byte [] iText.Kernel.Pdf.Canvas.Wmf.MetaDo.WrapBMP ( ImageData  image )
inlinestatic

Wrap a BMP image in an WMF.

Parameters
image the BMP image to be wrapped
Returns
the wrapped BMP

◆ WriteDWord()

static void iText.Kernel.Pdf.Canvas.Wmf.MetaDo.WriteDWord ( Stream  os,
int  v 
)
inlinestatic

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

Parameters
os outputstream to write the dword to
v value to be written

◆ WriteWord()

static void iText.Kernel.Pdf.Canvas.Wmf.MetaDo.WriteWord ( Stream  os,
int  v 
)
inlinestatic

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

Parameters
os outputstream to write the word to
v value to be written

Member Data Documentation

◆ cb

PdfCanvas iText.Kernel.Pdf.Canvas.Wmf.MetaDo.cb

PdfCanvas of the MetaDo object.

◆ in

InputMeta iText.Kernel.Pdf.Canvas.Wmf.MetaDo.in

The InputMeta instance containing the data.