public class AbstractWMFPainter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
bReadingWMF |
static int |
BRUSH |
protected java.io.BufferedInputStream |
bufStream |
protected int |
currentHorizAlign |
protected WMFRecordStore |
currentStore |
protected int |
currentVertAlign |
static int |
FONT |
static int |
NULL_BRUSH |
static int |
NULL_PEN |
static int |
OBJ_BITMAP |
static int |
OBJ_REGION |
static int |
PALETTE |
static int |
PEN |
static java.lang.String |
WMF_FILE_EXTENSION |
protected WMFFont |
wmfFont |
Constructor and Description |
---|
AbstractWMFPainter() |
Modifier and Type | Method and Description |
---|---|
protected int |
addObject(WMFRecordStore store,
int type,
java.lang.Object obj) |
protected int |
addObjectAt(WMFRecordStore store,
int type,
java.lang.Object obj,
int idx) |
protected java.text.AttributedString |
getAttributedString(java.awt.Graphics2D g2d,
java.lang.String sr,
WMFFont wmffont) |
protected java.text.AttributedCharacterIterator |
getCharacterIterator(java.awt.Graphics2D g2d,
java.lang.String sr,
WMFFont wmffont)
Create an AttributedCharacterIterator with the current definition of the WMF Font, and
the input String.
|
protected java.text.AttributedCharacterIterator |
getCharacterIterator(java.awt.Graphics2D g2d,
java.lang.String sr,
WMFFont wmffont,
int align)
Create an AttributedCharacterIterator with the current definition of the WMF Font, and
the input String.
|
protected java.awt.image.BufferedImage |
getImage(byte[] bit)
Return the image associated with a bitmap in a Metafile.
24 bits and 8 bits bitmaps are handled.
|
protected java.awt.image.BufferedImage |
getImage(byte[] bit,
int width,
int height)
Return the image associated with a bitmap in a Metafile.
24 bits and 8 bits bitmaps are handled.
|
protected java.awt.Dimension |
getImageDimension(byte[] bit) |
WMFRecordStore |
getRecordStore()
Returns the WMFRecordStore this WMFPainter renders.
|
void |
setRecordStore(WMFRecordStore currentStore)
Sets the WMFRecordStore this WMFPainter should use to render.
|
public static final java.lang.String WMF_FILE_EXTENSION
protected WMFFont wmfFont
protected int currentHorizAlign
protected int currentVertAlign
public static final int PEN
public static final int BRUSH
public static final int FONT
public static final int NULL_PEN
public static final int NULL_BRUSH
public static final int PALETTE
public static final int OBJ_BITMAP
public static final int OBJ_REGION
protected WMFRecordStore currentStore
protected transient boolean bReadingWMF
protected transient java.io.BufferedInputStream bufStream
protected java.awt.image.BufferedImage getImage(byte[] bit, int width, int height)
bit
- the bitmap byte arraywidth
- the bitmap assumed widthheight
- the bitmap assumed heightprotected java.awt.Dimension getImageDimension(byte[] bit)
protected java.awt.image.BufferedImage getImage(byte[] bit)
bit
- the bitmap byte arrayprotected java.text.AttributedCharacterIterator getCharacterIterator(java.awt.Graphics2D g2d, java.lang.String sr, WMFFont wmffont)
g2d
- graphics contextsr
- input stringwmffont
- the font definitionprotected java.text.AttributedCharacterIterator getCharacterIterator(java.awt.Graphics2D g2d, java.lang.String sr, WMFFont wmffont, int align)
g2d
- graphics contextsr
- input stringwmffont
- the font definitionalign
- current alignment (currently ignored)protected java.text.AttributedString getAttributedString(java.awt.Graphics2D g2d, java.lang.String sr, WMFFont wmffont)
public void setRecordStore(WMFRecordStore currentStore)
currentStore
- new WMF record storepublic WMFRecordStore getRecordStore()
protected int addObject(WMFRecordStore store, int type, java.lang.Object obj)
protected int addObjectAt(WMFRecordStore store, int type, java.lang.Object obj, int idx)