|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.pixie.wmf.records.MfCmd
public abstract class MfCmd
This is the base class for all WMF-Records. A WMF record specifies a single command for drawing a element of the image.
Constructor Summary | |
---|---|
MfCmd()
The default constructor, adjusts the scale to 1. |
Method Summary | |
---|---|
protected int[] |
applyScaleX(int[] n,
int[] dest)
Applies the new x-scaling to all values in the array n and places the values in the array dest. |
protected int[] |
applyScaleY(int[] n,
int[] dest)
Applies the new y-scaling to all values in the array n and places the values in the array dest. |
abstract int |
getFunction()
Reads the function identifier. |
abstract MfCmd |
getInstance()
Creates a empty unintialized copy of this command implementation. |
abstract MfRecord |
getRecord()
Creates a new record based on the data stored in the MfCommand. |
protected int |
getScaledHeight(int length)
Scales the given vertical length and makes sure that the lenght is at least 1. |
protected int |
getScaledWidth(int length)
Scales the given horizontal length and makes sure that the lenght is at least 1. |
int |
getScaledX(int x)
Return integer scaled to output units. |
int |
getScaledY(int y)
Return integer scaled to output units. |
abstract void |
replay(WmfFile metafile)
Replays the command on the given WmfFile. |
protected java.awt.Rectangle |
scaleRect(java.awt.Rectangle r)
Scales the given rectangle. |
protected abstract void |
scaleXChanged()
A callback function to inform the object, that the x scale has changed and the internal coordinate values have to be adjusted. |
protected abstract void |
scaleYChanged()
A callback function to inform the object, that the y scale has changed and the internal coordinate values have to be adjusted. |
abstract void |
setRecord(MfRecord record)
Reads the command data from the given record and adjusts the internal parameters according to the data parsed. |
void |
setScale(float scaleX,
float scaleY)
Set the scale for the command. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MfCmd()
Method Detail |
---|
public abstract MfRecord getRecord() throws RecordCreationException
RecordCreationException
public abstract void setRecord(MfRecord record)
record
- the raw data that makes up the record.public abstract int getFunction()
public abstract MfCmd getInstance()
public abstract void replay(WmfFile metafile)
metafile
- the meta file.public void setScale(float scaleX, float scaleY)
scaleX
- the horizontal scalescaleY
- the vertical scaleprotected abstract void scaleXChanged()
protected abstract void scaleYChanged()
protected java.awt.Rectangle scaleRect(java.awt.Rectangle r)
r
- the source rectangle.
protected int getScaledWidth(int length)
length
- the value that should be scaled.
protected int getScaledHeight(int length)
length
- the value that should be scaled.
protected int[] applyScaleX(int[] n, int[] dest)
n
- the unscaled source valuesdest
- the array to store the scaled values
protected int[] applyScaleY(int[] n, int[] dest)
n
- the unscaled source valuesdest
- the array to store the scaled values
public int getScaledY(int y)
y
- the unscaled y
public int getScaledX(int x)
x
- the unscaled x
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |