Class MetaDo
java.lang.Object
com.itextpdf.kernel.pdf.canvas.wmf.MetaDo
A class to process WMF files. Used internally by
WmfImageHelper
.
-
Field Summary
Modifier and TypeFieldDescriptionPdfCanvas of the MetaDo object.The InputMeta instance containing the data.static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isNullStrokeFill
(boolean isRectangle) Return true if the pen style is null and if it isn't a brush.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.void
readAll()
Reads and processes all the data of the InputMeta.void
Stroke and fill the MetaPen and MetaBrush paths.static byte[]
Wrap a BMP image in an WMF.static void
writeDWord
(OutputStream os, int v) Writes the specified value to the specified outputstream as a dword.static void
writeWord
(OutputStream os, int v) Writes the specified value to the specified outputstream as a word.
-
Field Details
-
META_SETBKCOLOR
public static final int META_SETBKCOLOR- See Also:
-
META_SETBKMODE
public static final int META_SETBKMODE- See Also:
-
META_SETMAPMODE
public static final int META_SETMAPMODE- See Also:
-
META_SETROP2
public static final int META_SETROP2- See Also:
-
META_SETRELABS
public static final int META_SETRELABS- See Also:
-
META_SETPOLYFILLMODE
public static final int META_SETPOLYFILLMODE- See Also:
-
META_SETSTRETCHBLTMODE
public static final int META_SETSTRETCHBLTMODE- See Also:
-
META_SETTEXTCHAREXTRA
public static final int META_SETTEXTCHAREXTRA- See Also:
-
META_SETTEXTCOLOR
public static final int META_SETTEXTCOLOR- See Also:
-
META_SETTEXTJUSTIFICATION
public static final int META_SETTEXTJUSTIFICATION- See Also:
-
META_SETWINDOWORG
public static final int META_SETWINDOWORG- See Also:
-
META_SETWINDOWEXT
public static final int META_SETWINDOWEXT- See Also:
-
META_SETVIEWPORTORG
public static final int META_SETVIEWPORTORG- See Also:
-
META_SETVIEWPORTEXT
public static final int META_SETVIEWPORTEXT- See Also:
-
META_OFFSETWINDOWORG
public static final int META_OFFSETWINDOWORG- See Also:
-
META_SCALEWINDOWEXT
public static final int META_SCALEWINDOWEXT- See Also:
-
META_OFFSETVIEWPORTORG
public static final int META_OFFSETVIEWPORTORG- See Also:
-
META_SCALEVIEWPORTEXT
public static final int META_SCALEVIEWPORTEXT- See Also:
-
META_LINETO
public static final int META_LINETO- See Also:
-
META_MOVETO
public static final int META_MOVETO- See Also:
-
META_EXCLUDECLIPRECT
public static final int META_EXCLUDECLIPRECT- See Also:
-
META_INTERSECTCLIPRECT
public static final int META_INTERSECTCLIPRECT- See Also:
-
META_ARC
public static final int META_ARC- See Also:
-
META_ELLIPSE
public static final int META_ELLIPSE- See Also:
-
META_FLOODFILL
public static final int META_FLOODFILL- See Also:
-
META_PIE
public static final int META_PIE- See Also:
-
META_RECTANGLE
public static final int META_RECTANGLE- See Also:
-
META_ROUNDRECT
public static final int META_ROUNDRECT- See Also:
-
META_PATBLT
public static final int META_PATBLT- See Also:
-
META_SAVEDC
public static final int META_SAVEDC- See Also:
-
META_SETPIXEL
public static final int META_SETPIXEL- See Also:
-
META_OFFSETCLIPRGN
public static final int META_OFFSETCLIPRGN- See Also:
-
META_TEXTOUT
public static final int META_TEXTOUT- See Also:
-
META_BITBLT
public static final int META_BITBLT- See Also:
-
META_STRETCHBLT
public static final int META_STRETCHBLT- See Also:
-
META_POLYGON
public static final int META_POLYGON- See Also:
-
META_POLYLINE
public static final int META_POLYLINE- See Also:
-
META_ESCAPE
public static final int META_ESCAPE- See Also:
-
META_RESTOREDC
public static final int META_RESTOREDC- See Also:
-
META_FILLREGION
public static final int META_FILLREGION- See Also:
-
META_FRAMEREGION
public static final int META_FRAMEREGION- See Also:
-
META_INVERTREGION
public static final int META_INVERTREGION- See Also:
-
META_PAINTREGION
public static final int META_PAINTREGION- See Also:
-
META_SELECTCLIPREGION
public static final int META_SELECTCLIPREGION- See Also:
-
META_SELECTOBJECT
public static final int META_SELECTOBJECT- See Also:
-
META_SETTEXTALIGN
public static final int META_SETTEXTALIGN- See Also:
-
META_CHORD
public static final int META_CHORD- See Also:
-
META_SETMAPPERFLAGS
public static final int META_SETMAPPERFLAGS- See Also:
-
META_EXTTEXTOUT
public static final int META_EXTTEXTOUT- See Also:
-
META_SETDIBTODEV
public static final int META_SETDIBTODEV- See Also:
-
META_SELECTPALETTE
public static final int META_SELECTPALETTE- See Also:
-
META_REALIZEPALETTE
public static final int META_REALIZEPALETTE- See Also:
-
META_ANIMATEPALETTE
public static final int META_ANIMATEPALETTE- See Also:
-
META_SETPALENTRIES
public static final int META_SETPALENTRIES- See Also:
-
META_POLYPOLYGON
public static final int META_POLYPOLYGON- See Also:
-
META_RESIZEPALETTE
public static final int META_RESIZEPALETTE- See Also:
-
META_DIBBITBLT
public static final int META_DIBBITBLT- See Also:
-
META_DIBSTRETCHBLT
public static final int META_DIBSTRETCHBLT- See Also:
-
META_DIBCREATEPATTERNBRUSH
public static final int META_DIBCREATEPATTERNBRUSH- See Also:
-
META_STRETCHDIB
public static final int META_STRETCHDIB- See Also:
-
META_EXTFLOODFILL
public static final int META_EXTFLOODFILL- See Also:
-
META_DELETEOBJECT
public static final int META_DELETEOBJECT- See Also:
-
META_CREATEPALETTE
public static final int META_CREATEPALETTE- See Also:
-
META_CREATEPATTERNBRUSH
public static final int META_CREATEPATTERNBRUSH- See Also:
-
META_CREATEPENINDIRECT
public static final int META_CREATEPENINDIRECT- See Also:
-
META_CREATEFONTINDIRECT
public static final int META_CREATEFONTINDIRECT- See Also:
-
META_CREATEBRUSHINDIRECT
public static final int META_CREATEBRUSHINDIRECT- See Also:
-
META_CREATEREGION
public static final int META_CREATEREGION- See Also:
-
cb
PdfCanvas of the MetaDo object. -
in
The InputMeta instance containing the data.
-
-
Constructor Details
-
MetaDo
Creates a MetaDo instance.- Parameters:
-
in
- inputstream containing the data -
cb
- PdfCanvas
-
-
Method Details
-
readAll
Reads and processes all the data of the InputMeta.- Throws:
-
IOException
- anIOException
-
outputText
public void outputText(int x, int y, int flag, int x1, int y1, int x2, int y2, String text) throws IOException 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 - Throws:
-
IOException
- anIOException
-
isNullStrokeFill
public boolean isNullStrokeFill(boolean isRectangle) 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
-
strokeAndFill
public void strokeAndFill()Stroke and fill the MetaPen and MetaBrush paths. -
wrapBMP
Wrap a BMP image in an WMF.- Parameters:
-
image
- the BMP image to be wrapped - Returns:
- the wrapped BMP
- Throws:
-
IOException
- anIOException
-
writeWord
Writes the specified value to the specified outputstream as a word.- Parameters:
-
os
- outputstream to write the word to -
v
- value to be written - Throws:
-
IOException
- anIOException
-
writeDWord
Writes the specified value to the specified outputstream as a dword.- Parameters:
-
os
- outputstream to write the dword to -
v
- value to be written - Throws:
-
IOException
- anIOException
-