org.jfree.pixie.wmf.records
Class MfCmdCreateFont

java.lang.Object
  extended by org.jfree.pixie.wmf.records.MfCmd
      extended by org.jfree.pixie.wmf.records.MfCmdCreateFont

public class MfCmdCreateFont
extends MfCmd

The CreateFontIndirect function creates a logical font that has the specified characteristics. The font can subsequently be selected as the current font for any device context.

typedef struct tagLOGFONT { LONG lfHeight; LONG lfWidth; LONG lfEscapement; LONG lfOrientation; LONG lfWeight; BYTE lfItalic; BYTE lfUnderline; BYTE lfStrikeOut; BYTE lfCharSet; BYTE lfOutPrecision; BYTE lfClipPrecision; BYTE lfQuality; BYTE lfPitchAndFamily; TCHAR lfFaceName[LF_FACESIZE]; } LOGFONT, *PLOGFONT;


Field Summary
static int CHARSET_ANSI
           
static int CHARSET_DEFAULT
           
static int CHARSET_OEM
           
static int CHARSET_SHIFTJIS
           
static int CHARSET_SYMBOL
           
 
Constructor Summary
MfCmdCreateFont()
           
 
Method Summary
 int getCharset()
           
 int getClipPrecision()
           
 int getEscapement()
           
 java.lang.String getFontFace()
           
 int getFunction()
          Reads the function identifier.
 int getHeight()
           
 MfCmd getInstance()
          Creates a empty unintialized copy of this command implementation.
 int getOrientation()
           
 int getOutputPrecision()
           
 int getPitchAndFamily()
           
 int getQuality()
           
 MfRecord getRecord()
          Creates a new record based on the data stored in the MfCommand.
 int getScaledHeight()
           
 int getScaledWidth()
           
 int getWeight()
           
 int getWidth()
           
 boolean isItalic()
           
 boolean isStrikeout()
           
 boolean isUnderline()
           
 void replay(WmfFile file)
          Replays the command on the given WmfFile.
protected  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  void scaleYChanged()
          A callback function to inform the object, that the y scale has changed and the internal coordinate values have to be adjusted.
 void setCharset(int charset)
           
 void setClipPrecision(int clipprecision)
           
 void setEscapement(int escapement)
           
 void setFontFace(java.lang.String facename)
           
 void setHeight(int height)
           
 void setItalic(boolean italic)
           
 void setOrientation(int orientation)
           
 void setOutputPrecision(int outprecision)
           
 void setPitchAndFamily(int pitchAndFamily)
           
 void setQuality(int quality)
           
 void setRecord(MfRecord record)
          Reads the command data from the given record and adjusts the internal parameters according to the data parsed.
 void setStrikeout(boolean so)
           
 void setUnderline(boolean ul)
           
 void setWeight(int weight)
           
 void setWidth(int width)
           
 java.lang.String toString()
           
 
Methods inherited from class org.jfree.pixie.wmf.records.MfCmd
applyScaleX, applyScaleY, getScaledHeight, getScaledWidth, getScaledX, getScaledY, scaleRect, setScale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CHARSET_ANSI

public static final int CHARSET_ANSI
See Also:
Constant Field Values

CHARSET_DEFAULT

public static final int CHARSET_DEFAULT
See Also:
Constant Field Values

CHARSET_SYMBOL

public static final int CHARSET_SYMBOL
See Also:
Constant Field Values

CHARSET_SHIFTJIS

public static final int CHARSET_SHIFTJIS
See Also:
Constant Field Values

CHARSET_OEM

public static final int CHARSET_OEM
See Also:
Constant Field Values
Constructor Detail

MfCmdCreateFont

public MfCmdCreateFont()
Method Detail

replay

public void replay(WmfFile file)
Replays the command on the given WmfFile.

Specified by:
replay in class MfCmd
Parameters:
file - the meta file.

getInstance

public MfCmd getInstance()
Creates a empty unintialized copy of this command implementation.

Specified by:
getInstance in class MfCmd
Returns:
a new instance of the command.

getRecord

public MfRecord getRecord()
Creates a new record based on the data stored in the MfCommand.

Specified by:
getRecord in class MfCmd
Returns:
the created record.

setRecord

public void setRecord(MfRecord record)
Description copied from class: MfCmd
Reads the command data from the given record and adjusts the internal parameters according to the data parsed.

After the raw record was read from the datasource, the record is parsed by the concrete implementation.

Specified by:
setRecord in class MfCmd
Parameters:
record - the raw data that makes up the record.

getFunction

public int getFunction()
Reads the function identifier. Every record type is identified by a function number corresponding to one of the Windows GDI functions used.

Specified by:
getFunction in class MfCmd
Returns:
the function identifier.

setFontFace

public void setFontFace(java.lang.String facename)

getFontFace

public java.lang.String getFontFace()

setPitchAndFamily

public void setPitchAndFamily(int pitchAndFamily)

getPitchAndFamily

public int getPitchAndFamily()

setQuality

public void setQuality(int quality)

getQuality

public int getQuality()

setClipPrecision

public void setClipPrecision(int clipprecision)

getClipPrecision

public int getClipPrecision()

setOutputPrecision

public void setOutputPrecision(int outprecision)

getOutputPrecision

public int getOutputPrecision()

setCharset

public void setCharset(int charset)

getCharset

public int getCharset()

setHeight

public void setHeight(int height)

getHeight

public int getHeight()

getScaledHeight

public int getScaledHeight()

setWidth

public void setWidth(int width)

scaleXChanged

protected void scaleXChanged()
A callback function to inform the object, that the x scale has changed and the internal coordinate values have to be adjusted.

Specified by:
scaleXChanged in class MfCmd

scaleYChanged

protected void scaleYChanged()
A callback function to inform the object, that the y scale has changed and the internal coordinate values have to be adjusted.

Specified by:
scaleYChanged in class MfCmd

getWidth

public int getWidth()

getScaledWidth

public int getScaledWidth()

setEscapement

public void setEscapement(int escapement)

getEscapement

public int getEscapement()

setOrientation

public void setOrientation(int orientation)

getOrientation

public int getOrientation()

setWeight

public void setWeight(int weight)

getWeight

public int getWeight()

setItalic

public void setItalic(boolean italic)

isItalic

public boolean isItalic()

setUnderline

public void setUnderline(boolean ul)

isUnderline

public boolean isUnderline()

setStrikeout

public void setStrikeout(boolean so)

isStrikeout

public boolean isStrikeout()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object