Package rma.util.wmf
Class WMF
java.lang.Object
rma.util.wmf.WMF
A class for writing Windows metafiles. It encapsulats many Windows GDI
commands useful in Windows metafiles.
To create a Windows metafile you have to construct a WMF object:
In Windows metafiles GDI Objects like Pens, Brushes and Fonts are stored in a handle table by
Please consult the Windows SDK for the GDI commands and GDI constants.
WMF is compatible with JDK 1.0, JDK 1.1 and JDK 1.2
WMF wmf = new WMF();and call the appropriate GDI commands:
wmf.moveTo(0, 0); wmf.lineTo(10, 24); wmf.rectangle(10, 24, 100, 130); ...or use a WMFGraphics object:
WMFGraphics wmfg = new WMFGraphics(wmf, 400, 300); wmfg.drawLine(10, 10, 45, 34); wmfg.drawRect(0, 0, 400, 300); ... wmfg.deleteGDIObjects(); //not necessary but clean styleTo write a standard Windows metafile to an
OutputStream out
use:
wmf.writePlaceableWMF(out, 0, 0, 300, 200)which creates a metafile compatible with almost all Windows programs.
In Windows metafiles GDI Objects like Pens, Brushes and Fonts are stored in a handle table by
createXXXIndirect
.
SelectObject
selects one of the objects to draw something,
while DeleteObject
removes them from the table. All GDI
objects are removed via
DeleteObject
at the end of the metafile by WMF by
default.Please consult the Windows SDK for the GDI commands and GDI constants.
WMF is compatible with JDK 1.0, JDK 1.1 and JDK 1.2
- See Also:
-
com.pietjonas.wmfwriter2d.WMFGraphics
com.pietjonas.wmfwriter2d.WMFGraphics2D
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final byte
static final int
static final int
static final int
static final int
static final int
static final int
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final int
static final int
static final byte
static final int
static final int
static final int
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
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 byte
static final int
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final int
static final int
static final int
static final byte
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 byte
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 byte
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 byte
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Add a new handle to the handle table with GDI objects .void
arc
(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) See Windows SDK.void
bitBlt
(int dx, int dy, int dwidth, int dheight, int sx, int sy, int rop, int[] pix, int width, int height) See Windows SDK.void
chord
(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) See Windows SDK.int
createBrushIndirect
(int style, Color foreground, int hatch) See Windows SDK.int
createFont
(Font font, int escapement, boolean underline, boolean strikeout) Convenience method to callcreateFontIndirect
with a java.awt.Font.int
createFontIndirect
(int height, int width, int escapement, int orientation, int weight, boolean italic, boolean underline, boolean strikeout, byte charset, byte outprecision, byte clipprecision, byte quality, byte pitchandfamiliy, String name) See Windows SDK.int
createPatternBrush
(int[] pix, int width, int height) See Windows SDK.int
createPenIndirect
(int style, int width, Color foreground) See Windows SDK.void
deleteObject
(int index) See Windows SDK.void
ellipse
(int x1, int y1, int x2, int y2) See Windows SDK.void
escape
(int number, byte[] data) See Windows SDK.void
extTextOut
(int x, int y, int options, Rectangle rect, String str) See Windows SDK.void
extTextOut
(int x, int y, int options, Rectangle rect, String str, int[] dx) See Windows SDK.String[][]
Returns the current String replacement table.void
intersectClipRect
(int x1, int y1, int x2, int y2) See Windows SDK.void
lineTo
(int x, int y) See Windows SDK.protected void
metaRecord
(int id, int wordparams) Write the leading metafile recordvoid
moveTo
(int x, int y) See Windows SDK.void
offsetViewportOrg
(int x, int y) See Windows SDK, should not be called in a metafile.void
offsetWindowOrg
(int x, int y) See Windows SDK.void
patBlt
(int x, int y, int width, int height, int rop) See Windows SDK.void
pie
(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) See Windows SDK.void
polygon
(int[] xPoints, int[] yPoints, int nPoints) See Windows SDK.void
polyline
(int[] xPoints, int[] yPoints, int nPoints) See Windows SDK.void
polypolygon
(Polygon[] polys) See Windows SDK.void
rectangle
(int x1, int y1, int x2, int y2) See Windows SDK.void
roundRect
(int x1, int y1, int x2, int y2, int x3, int y3) See Windows SDK.void
scaleViewportExt
(int xnum, int xdenom, int ynum, int ydenom) See Windows SDK, should not be called in a metafile.void
scaleWindowExt
(int xnum, int xdenom, int ynum, int ydenom) See Windows SDK.void
selectObject
(int index) See Windows SDK.void
setBKColor
(Color bkcolor) See Windows SDK.void
setBKMode
(int mode) See Windows SDK.void
See Windows SDK.void
setMapMode
(int mode) See Windows SDK.void
See Windows SDK.void
setPolyFillMode
(int mode) See Windows SDK.void
setROP2
(int mode) See Windows SDK.void
setStretchBltMode
(int mode) See Windows SDK.void
setTextAlign
(int align) See Windows SDK.void
setTextCharacterExtra
(int charextra) See Windows SDK.void
setTextColor
(Color textcolor) See Windows SDK.void
setTextJustification
(int breakextra, int breakcount) See Windows SDK.void
setTranslateFontNames
(String[][] names) Sets the String replacement table for the font names.void
setViewportExt
(int width, int height) See Windows SDK, should not be called in a metafile.void
setViewportOrg
(int x, int y) See Windows SDK, should not be called in a metafile.void
setWindowExt
(int width, int height) See Windows SDK, should be called at the beginning of a metafile with the extend of the metafile.void
setWindowOrg
(int x, int y) See Windows SDK, should be called at the beginning of a metafile with the origin of the metafile.void
stretchBlt
(int dx, int dy, int dwidth, int dheight, int sx, int sy, int swidth, int sheight, int rop, int[] pix, int width, int height) See Windows SDK.void
See Windows SDK.translateFontName
(String name) Replace a Java font name (e.g 'helvetica') by its Windows counterpart (e.g 'Arial').protected void
writeBitmap
(int[] tmppix, int width, int height) Write a 24 bit bitmap (TBitmapInfoHeader plus pixels) to the metafileprotected void
writeColor
(Color color) Write a TColorRef struct to the metafileprotected void
writeInteger
(int value) Write an integer (four bytes) to the metafilevoid
writePlaceableWMF
(OutputStream out, int x, int y, int width, int height, int dpi) Write a placeable Windows metafile with the called GDI commands to the OutputStreamout
which is compatible with almost all Windows programs.void
writeWMF
(OutputStream out) Write a simple Windows metafile with the called GDI commands to the OutputStreamout
which is not recognized by a lot of Windows programs.protected void
writeWord
(int value) Write a word (two bytes) to the metafile
-
Field Details
-
PS_SOLID
public static final int PS_SOLID- See Also:
-
PS_DASH
public static final int PS_DASH- See Also:
-
PS_DOT
public static final int PS_DOT- See Also:
-
PS_DASHDOT
public static final int PS_DASHDOT- See Also:
-
PS_DASHDOTDOT
public static final int PS_DASHDOTDOT- See Also:
-
PS_NULL
public static final int PS_NULL- See Also:
-
PS_INSIDEFRAME
public static final int PS_INSIDEFRAME- See Also:
-
BS_SOLID
public static final int BS_SOLID- See Also:
-
BS_HOLLOW
public static final int BS_HOLLOW- See Also:
-
BS_NULL
public static final int BS_NULL- See Also:
-
BS_HATCHED
public static final int BS_HATCHED- See Also:
-
BS_PATTERN
public static final int BS_PATTERN- See Also:
-
HS_HORIZONTAL
public static final int HS_HORIZONTAL- See Also:
-
HS_VERTICAL
public static final int HS_VERTICAL- See Also:
-
HS_FDIAGONAL
public static final int HS_FDIAGONAL- See Also:
-
HS_BDIAGONAL
public static final int HS_BDIAGONAL- See Also:
-
HS_CROSS
public static final int HS_CROSS- See Also:
-
HS_DIAGCROSS
public static final int HS_DIAGCROSS- See Also:
-
DIB_RGB_COLORS
public static final int DIB_RGB_COLORS- See Also:
-
DIB_PAL_COLORS
public static final int DIB_PAL_COLORS- See Also:
-
FW_DONTCARE
public static final int FW_DONTCARE- See Also:
-
FW_THIN
public static final int FW_THIN- See Also:
-
FW_NORMAL
public static final int FW_NORMAL- See Also:
-
FW_BOLD
public static final int FW_BOLD- See Also:
-
FW_BLACK
public static final int FW_BLACK- See Also:
-
ANSI_CHARSET
public static final byte ANSI_CHARSET- See Also:
-
DEFAULT_CHARSET
public static final byte DEFAULT_CHARSET- See Also:
-
SYMBOL_CHARSET
public static final byte SYMBOL_CHARSET- See Also:
-
SHIFTJIS_CHARSET
public static final byte SHIFTJIS_CHARSET- See Also:
-
OEM_CHARSET
public static final byte OEM_CHARSET- See Also:
-
OUT_DEFAULT_PRECIS
public static final byte OUT_DEFAULT_PRECIS- See Also:
-
OUT_STRING_PRECIS
public static final byte OUT_STRING_PRECIS- See Also:
-
OUT_CHARACTER_PRECIS
public static final byte OUT_CHARACTER_PRECIS- See Also:
-
OUT_STROKE_PRECIS
public static final byte OUT_STROKE_PRECIS- See Also:
-
OUT_TT_PRECIS
public static final byte OUT_TT_PRECIS- See Also:
-
OUT_DEVICE_PRECIS
public static final byte OUT_DEVICE_PRECIS- See Also:
-
OUT_RASTER_PRECIS
public static final byte OUT_RASTER_PRECIS- See Also:
-
CLIP_DEFAULT_PRECIS
public static final byte CLIP_DEFAULT_PRECIS- See Also:
-
CLIP_CHARACTER_PRECIS
public static final byte CLIP_CHARACTER_PRECIS- See Also:
-
CLIP_STROKE_PRECIS
public static final byte CLIP_STROKE_PRECIS- See Also:
-
CLIP_MASK
public static final byte CLIP_MASK- See Also:
-
CLIP_LH_ANGLES
public static final byte CLIP_LH_ANGLES- See Also:
-
CLIP_TT_ALWAYS
public static final byte CLIP_TT_ALWAYS- See Also:
-
DEFAULT_QUALITY
public static final byte DEFAULT_QUALITY- See Also:
-
DRAFT_QUALITY
public static final byte DRAFT_QUALITY- See Also:
-
PROOF_QUALITY
public static final byte PROOF_QUALITY- See Also:
-
DEFAULT_PITCH
public static final byte DEFAULT_PITCH- See Also:
-
FIXED_PITCH
public static final byte FIXED_PITCH- See Also:
-
VARIABLE_PITCH
public static final byte VARIABLE_PITCH- See Also:
-
FF_DONTCARE
public static final byte FF_DONTCARE- See Also:
-
FF_ROMAN
public static final byte FF_ROMAN- See Also:
-
FF_SWISS
public static final byte FF_SWISS- See Also:
-
FF_MODERN
public static final byte FF_MODERN- See Also:
-
FF_SCRIPT
public static final byte FF_SCRIPT- See Also:
-
FF_DECORATIVE
public static final byte FF_DECORATIVE- See Also:
-
TRANSPARENT
public static final int TRANSPARENT- See Also:
-
OPAQUE
public static final int OPAQUE- See Also:
-
MM_TEXT
public static final int MM_TEXT- See Also:
-
MM_LOMETRIC
public static final int MM_LOMETRIC- See Also:
-
MM_HIMETRIC
public static final int MM_HIMETRIC- See Also:
-
MM_LOENGLISH
public static final int MM_LOENGLISH- See Also:
-
MM_HIENGLISH
public static final int MM_HIENGLISH- See Also:
-
MM_HITWIPS
public static final int MM_HITWIPS- See Also:
-
MM_ISOTROPIC
public static final int MM_ISOTROPIC- See Also:
-
MM_ANISOTROPIC
public static final int MM_ANISOTROPIC- See Also:
-
ALTERNATE
public static final int ALTERNATE- See Also:
-
WINDING
public static final int WINDING- See Also:
-
STRETCH_ANDSCANS
public static final int STRETCH_ANDSCANS- See Also:
-
STRETCH_ORSCANS
public static final int STRETCH_ORSCANS- See Also:
-
STRETCH_DELETESCANS
public static final int STRETCH_DELETESCANS- See Also:
-
TA_TOP
public static final int TA_TOP- See Also:
-
TA_BOTTOM
public static final int TA_BOTTOM- See Also:
-
TA_BASELINE
public static final int TA_BASELINE- See Also:
-
TA_LEFT
public static final int TA_LEFT- See Also:
-
TA_RIGHT
public static final int TA_RIGHT- See Also:
-
TA_CENTER
public static final int TA_CENTER- See Also:
-
TA_NOUPDATECP
public static final int TA_NOUPDATECP- See Also:
-
TA_UPDATECP
public static final int TA_UPDATECP- See Also:
-
R2_BLACK
public static final int R2_BLACK- See Also:
-
R2_NOTMERGEPEN
public static final int R2_NOTMERGEPEN- See Also:
-
R2_MASKNOTPENNOT
public static final int R2_MASKNOTPENNOT- See Also:
-
R2_NOTCOPYPEN
public static final int R2_NOTCOPYPEN- See Also:
-
R2_MASKPENNOT
public static final int R2_MASKPENNOT- See Also:
-
R2_NOT
public static final int R2_NOT- See Also:
-
R2_XORPEN
public static final int R2_XORPEN- See Also:
-
R2_NOTMASKPEN
public static final int R2_NOTMASKPEN- See Also:
-
R2_MASKPEN
public static final int R2_MASKPEN- See Also:
-
R2_NOTXORPEN
public static final int R2_NOTXORPEN- See Also:
-
R2_NOP
public static final int R2_NOP- See Also:
-
R2_MERGENOTPEN
public static final int R2_MERGENOTPEN- See Also:
-
R2_COPYPEN
public static final int R2_COPYPEN- See Also:
-
R2_MERGEPENNOT
public static final int R2_MERGEPENNOT- See Also:
-
R2_MERGEPEN
public static final int R2_MERGEPEN- See Also:
-
R2_WHITE
public static final int R2_WHITE- See Also:
-
ETO_OPAQUE
public static final int ETO_OPAQUE- See Also:
-
ETO_CLIPPED
public static final int ETO_CLIPPED- See Also:
-
BLACKNESS
public static final int BLACKNESS- See Also:
-
NOTSRCERASE
public static final int NOTSRCERASE- See Also:
-
NOTSRCCOPY
public static final int NOTSRCCOPY- See Also:
-
SRCERASE
public static final int SRCERASE- See Also:
-
DSTINVERT
public static final int DSTINVERT- See Also:
-
PATINVERT
public static final int PATINVERT- See Also:
-
SRCINVERT
public static final int SRCINVERT- See Also:
-
SRCAND
public static final int SRCAND- See Also:
-
MERGEPAINT
public static final int MERGEPAINT- See Also:
-
SRCCOPY
public static final int SRCCOPY- See Also:
-
SRCPAINT
public static final int SRCPAINT- See Also:
-
PATCOPY
public static final int PATCOPY- See Also:
-
PATPAINT
public static final int PATPAINT- See Also:
-
WHITENESS
public static final int WHITENESS- See Also:
-
-
Constructor Details
-
WMF
public WMF()constructs a WMF object.
-
-
Method Details
-
metaRecord
protected void metaRecord(int id, int wordparams) Write the leading metafile record- Parameters:
id
- the id of the metafile recordwordparames
- the number of words (two bytes) of the parameters of therecord
-
writeWord
protected void writeWord(int value) Write a word (two bytes) to the metafile- Parameters:
value
- the word (in the lower two bytes)
-
writeInteger
protected void writeInteger(int value) Write an integer (four bytes) to the metafile- Parameters:
value
- the integer
-
writeColor
Write a TColorRef struct to the metafile- Parameters:
color
- the Color
-
writeBitmap
protected void writeBitmap(int[] tmppix, int width, int height) Write a 24 bit bitmap (TBitmapInfoHeader plus pixels) to the metafile- Parameters:
tmppix
- the pixels as retrieved by java.awt.image.PixelGrabberwidth
- the width of the bitmapheight
- the height of the bitmap
-
addHandle
protected int addHandle()Add a new handle to the handle table with GDI objects . Used by the createXXXIndirect methods.- See Also:
-
translateFontName
Replace a Java font name (e.g 'helvetica') by its Windows counterpart (e.g 'Arial'). Uses a String [][2] table with pairs of font names. If the Java font name can not be found in the table the return value is equal to name.- Parameters:
name
- the Java font name- Returns:
- the corresponding Windows fontname
- See Also:
-
setTranslateFontNames
Sets the String replacement table for the font names.- Parameters:
names
- the String[][2] table with pairs of font names {Java font, Windows font}- See Also:
-
getTranslateFontNames
Returns the current String replacement table.- Returns:
- the String replacement table.
- See Also:
-
writePlaceableWMF
public void writePlaceableWMF(OutputStream out, int x, int y, int width, int height, int dpi) throws IOException Write a placeable Windows metafile with the called GDI commands to the OutputStreamout
which is compatible with almost all Windows programs. All currently created GDI objects are deleted.- Parameters:
out
- The OutputStream to write the metafile.x
- The x coordinate of the bounding rectangle.y
- The y coordinate of the bounding rectangle.width
- The width of the bounding rectangle.height
- The height of the bounding rectangle.dpi
- Specifies the number of metafile units to the inch.- Throws:
IOException
- See Also:
-
writeWMF
Write a simple Windows metafile with the called GDI commands to the OutputStreamout
which is not recognized by a lot of Windows programs. All currently created GDI objects are deleted.- Parameters:
out
- The OutputStream to write the metafile.- Throws:
IOException
- See Also:
-
selectObject
public void selectObject(int index) See Windows SDK. Selects a GDI object from the handle table.- Parameters:
index
- The index in the handle table- See Also:
-
deleteObject
public void deleteObject(int index) See Windows SDK. Removes a GDI object from the handle table and deletes it.- Parameters:
index
- The index in the handle table- See Also:
-
createPenIndirect
See Windows SDK. Adds this GDI pen object to the next free place in the handle table.- Parameters:
style
- Use a PS_XXX constant.- See Also:
-
createBrushIndirect
See Windows SDK. Adds this GDI brush object to the next free place in the handle table.- Parameters:
style
- Use a BS_XXX constant.hatch
- Use a HS_XXX constant.- See Also:
-
createPatternBrush
public int createPatternBrush(int[] pix, int width, int height) See Windows SDK. Adds this GDI pattern brush object to the next free place in the handle table.- Parameters:
pix
- The pixels of the pattern bitmap (from java.awt.image.PixelGrabber).width
- The width of the bitmap. Should be 8 at least.height
- The height of the bitmap. Should be 8 at least.- See Also:
-
createFont
Convenience method to callcreateFontIndirect
with a java.awt.Font. Adds this GDI font object to the next free place in the handle table.- Parameters:
font
- The Java Font object.escapement
- The drawing angle of the font (in tenth degrees).underline
- Whether to underline the font.strikeout
- Whether to strike the font out.- See Also:
-
createFontIndirect
public int createFontIndirect(int height, int width, int escapement, int orientation, int weight, boolean italic, boolean underline, boolean strikeout, byte charset, byte outprecision, byte clipprecision, byte quality, byte pitchandfamiliy, String name) See Windows SDK. Adds this GDI font object to the next free place in the handle table.- Parameters:
height
- The height of the font.width
- The width of the font (can be 0).escapement
- The drawing angle of the font (in tenth degrees).orientation
- Ignored.weight
- Use a FW_XXX constant.italic
- Whether to draw use an italic font.underline
- Whether to underline the font.strikeout
- Whether to strike the font out.quality
- Use a XXX_CHARSET constant.outprecision
- Use a OUT_XXX constant.clipprecision
- Use a CLIP_XXX constant.quality
- Use a XXX_QUALITY constant.pitchandfamily
- Use a combination of XXX_PITCH and FF_XXX constants.name
- The font name.- See Also:
-
setWindowOrg
public void setWindowOrg(int x, int y) See Windows SDK, should be called at the beginning of a metafile with the origin of the metafile. -
setWindowExt
public void setWindowExt(int width, int height) See Windows SDK, should be called at the beginning of a metafile with the extend of the metafile. -
offsetWindowOrg
public void offsetWindowOrg(int x, int y) See Windows SDK. -
scaleWindowExt
public void scaleWindowExt(int xnum, int xdenom, int ynum, int ydenom) See Windows SDK. -
setViewportOrg
public void setViewportOrg(int x, int y) See Windows SDK, should not be called in a metafile. -
setViewportExt
public void setViewportExt(int width, int height) See Windows SDK, should not be called in a metafile. -
offsetViewportOrg
public void offsetViewportOrg(int x, int y) See Windows SDK, should not be called in a metafile. -
scaleViewportExt
public void scaleViewportExt(int xnum, int xdenom, int ynum, int ydenom) See Windows SDK, should not be called in a metafile. -
setTextColor
See Windows SDK. -
setBKMode
public void setBKMode(int mode) See Windows SDK.- Parameters:
mode
- Use TRANSPARENT or OPAQUE.
-
setBKColor
See Windows SDK. -
setMapMode
public void setMapMode(int mode) See Windows SDK.- Parameters:
mode
- Use a MM_XXX constant.
-
setPolyFillMode
public void setPolyFillMode(int mode) See Windows SDK.- Parameters:
mode
- Use ALTERNATE or WINDING.
-
setStretchBltMode
public void setStretchBltMode(int mode) See Windows SDK.- Parameters:
mode
- Use a STRETCH_XXX constant.
-
setTextAlign
public void setTextAlign(int align) See Windows SDK.- Parameters:
align
- Use a combination of TA_XXX constants.
-
setROP2
public void setROP2(int mode) See Windows SDK.- Parameters:
mode
- Use a R2_XXX constant.
-
setTextCharacterExtra
public void setTextCharacterExtra(int charextra) See Windows SDK. -
setTextJustification
public void setTextJustification(int breakextra, int breakcount) See Windows SDK. -
moveTo
public void moveTo(int x, int y) See Windows SDK. -
lineTo
public void lineTo(int x, int y) See Windows SDK. -
arc
public void arc(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) See Windows SDK. -
chord
public void chord(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) See Windows SDK. -
pie
public void pie(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) See Windows SDK. -
rectangle
public void rectangle(int x1, int y1, int x2, int y2) See Windows SDK. -
ellipse
public void ellipse(int x1, int y1, int x2, int y2) See Windows SDK. -
roundRect
public void roundRect(int x1, int y1, int x2, int y2, int x3, int y3) See Windows SDK. -
polygon
public void polygon(int[] xPoints, int[] yPoints, int nPoints) See Windows SDK. -
polypolygon
See Windows SDK. -
polyline
public void polyline(int[] xPoints, int[] yPoints, int nPoints) See Windows SDK. -
intersectClipRect
public void intersectClipRect(int x1, int y1, int x2, int y2) See Windows SDK. -
setClipRgn
public void setClipRgn()See Windows SDK. Selects a NIL region, therefore removes any clipping -
textOut
See Windows SDK. -
extTextOut
See Windows SDK.- Parameters:
options
- Use a ETO_XXX constant.rect
- Bounding box. Is ignored, if options == 0
-
extTextOut
See Windows SDK.- Parameters:
options
- Use a ETO_XXX constant.rect
- Bounding box. Is ignored, if options == 0dx
- Distance between character cells. Can be null. dx.length() >= str.length
-
escape
public void escape(int number, byte[] data) See Windows SDK. -
setPixel
See Windows SDK. -
stretchBlt
public void stretchBlt(int dx, int dy, int dwidth, int dheight, int sx, int sy, int swidth, int sheight, int rop, int[] pix, int width, int height) See Windows SDK.- Parameters:
dx
- ,dy,dwidth,dheight The destination rectanglesx
- ,sy,swidth,sheight The source rectanglerop
- Use a SRCXXX constant.pix
- The pixels of the source bitmap (from java.awt.image.PixelGrabber).width
- The width of the bitmap.height
- The height of the bitmap.
-
bitBlt
public void bitBlt(int dx, int dy, int dwidth, int dheight, int sx, int sy, int rop, int[] pix, int width, int height) See Windows SDK.- Parameters:
dx
- ,dy,dwidth,dheight The destination rectanglesx
- ,sy The source originrop
- Use a SRCXXX constant.pix
- The pixels of the source bitmap (from java.awt.image.PixelGrabber).width
- The width of the bitmap.height
- The height of the bitmap.
-
patBlt
public void patBlt(int x, int y, int width, int height, int rop) See Windows SDK.- Parameters:
x
- ,y,width,height The destination rectanglerop
- Use a PATXXX constant.
-