public class HemfGraphics extends HwmfGraphics
Modifier and Type | Class and Description |
---|---|
static class |
HemfGraphics.EmfRenderState |
HwmfGraphics.FillDrawStyle
graphicsCtx, objectIndexes, objectTable, prop
Constructor and Description |
---|
HemfGraphics(java.awt.Graphics2D graphicsCtx,
java.awt.geom.Rectangle2D bbox) |
Modifier and Type | Method and Description |
---|---|
void |
addObjectTableEntry(HwmfObjectTableEntry entry,
int index)
Adds or sets an record of type
HwmfObjectTableEntry to the object table. |
void |
addPlusObjectTableEntry(HwmfObjectTableEntry entry,
int index)
Adds or sets an record of type
HwmfObjectTableEntry to the plus object table. |
void |
applyObjectTableEntry(int index)
Applies the object table entry
|
void |
applyPlusObjectTableEntry(int index) |
void |
draw(java.util.function.Consumer<java.awt.geom.Path2D> pathConsumer,
HwmfGraphics.FillDrawStyle fillDraw) |
void |
draw(HemfPlusRecord r) |
void |
draw(HemfRecord r) |
void |
fill(java.awt.Shape shape) |
protected java.awt.Paint |
getHatchedFill() |
protected java.awt.Paint |
getLinearGradient() |
HwmfObjectTableEntry |
getObjectTableEntry(int index)
Gets a record which was registered earlier
|
HwmfObjectTableEntry |
getPlusObjectTableEntry(int index) |
HemfDrawProperties |
getProperties() |
HemfGraphics.EmfRenderState |
getRenderState() |
protected HemfDrawProperties |
newProperties(HwmfDrawProperties oldProps) |
void |
restorePlusProperties(int index)
Restores the properties from the plus stack
|
void |
savePlusProperties(int index)
Saves the current properties to the plus stack
|
void |
setRenderState(HemfGraphics.EmfRenderState renderState) |
void |
updateWindowMapMode()
After setting various window and viewport related properties,
the underlying graphics context needs to be adapted.
|
addObjectTableEntry, draw, drawImage, drawImage, drawString, drawString, getFill, getImageRenderer, getInitTransform, getPatternFromLong, getPatternPaint, getSolidFill, getStroke, getTransform, restoreProperties, saveProperties, setCharsetProvider, setClip, setTransform, unsetObjectTableEntry
public HemfGraphics(java.awt.Graphics2D graphicsCtx, java.awt.geom.Rectangle2D bbox)
public HemfDrawProperties getProperties()
getProperties
in class HwmfGraphics
protected HemfDrawProperties newProperties(HwmfDrawProperties oldProps)
newProperties
in class HwmfGraphics
public HemfGraphics.EmfRenderState getRenderState()
public void setRenderState(HemfGraphics.EmfRenderState renderState)
public void draw(HemfRecord r)
public void draw(HemfPlusRecord r)
@Internal public void draw(java.util.function.Consumer<java.awt.geom.Path2D> pathConsumer, HwmfGraphics.FillDrawStyle fillDraw)
public void addObjectTableEntry(HwmfObjectTableEntry entry, int index)
HwmfObjectTableEntry
to the object table.
The index must be > 0entry
- the record to be storedindex
- the index to be overwritten, regardless if its content was unset beforeHwmfGraphics.addObjectTableEntry(HwmfObjectTableEntry)
public void addPlusObjectTableEntry(HwmfObjectTableEntry entry, int index)
HwmfObjectTableEntry
to the plus object table.
The index must be in the range [0..63]entry
- the record to be storedindex
- the index to be overwritten, regardless if its content was unset beforeHwmfGraphics.addObjectTableEntry(HwmfObjectTableEntry)
public HwmfObjectTableEntry getObjectTableEntry(int index)
index
- the record indexnull
if it doesn't existpublic HwmfObjectTableEntry getPlusObjectTableEntry(int index)
public void applyObjectTableEntry(int index)
HwmfGraphics
applyObjectTableEntry
in class HwmfGraphics
index
- the index of the object table entry (0-based)public void applyPlusObjectTableEntry(int index)
protected java.awt.Paint getHatchedFill()
getHatchedFill
in class HwmfGraphics
public void updateWindowMapMode()
HwmfGraphics
updateWindowMapMode
in class HwmfGraphics
public void fill(java.awt.Shape shape)
fill
in class HwmfGraphics
protected java.awt.Paint getLinearGradient()
getLinearGradient
in class HwmfGraphics
public void savePlusProperties(int index)
public void restorePlusProperties(int index)
index
- the index of the previously saved propertiesCopyright 2021 The Apache Software Foundation or its licensors, as applicable.