org.jfree.pixie.wmf.records

Class 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()
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(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)
void
setStrikeout(boolean so)
void
setUnderline(boolean ul)
void
setWeight(int weight)
void
setWidth(int width)
String
toString()

Methods inherited from class org.jfree.pixie.wmf.records.MfCmd

applyScaleX, applyScaleY, getFunction, getInstance, getRecord, getScaledHeight, getScaledWidth, getScaledX, getScaledY, replay, scaleRect, scaleXChanged, scaleYChanged, setRecord, setScale

Field Details

CHARSET_ANSI

public static final int CHARSET_ANSI
Field Value:
0

CHARSET_DEFAULT

public static final int CHARSET_DEFAULT
Field Value:
1

CHARSET_OEM

public static final int CHARSET_OEM
Field Value:
255

CHARSET_SHIFTJIS

public static final int CHARSET_SHIFTJIS
Field Value:
128

CHARSET_SYMBOL

public static final int CHARSET_SYMBOL
Field Value:
2

Constructor Details

MfCmdCreateFont

public MfCmdCreateFont()

Method Details

getCharset

public int getCharset()

getClipPrecision

public int getClipPrecision()

getEscapement

public int getEscapement()

getFontFace

public String getFontFace()

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.
Overrides:
getFunction in interface MfCmd
Returns:
the function identifier.

getHeight

public int getHeight()

getInstance

public MfCmd getInstance()
Creates a empty unintialized copy of this command implementation.
Overrides:
getInstance in interface MfCmd
Returns:
a new instance of the command.

getOrientation

public int getOrientation()

getOutputPrecision

public int getOutputPrecision()

getPitchAndFamily

public int getPitchAndFamily()

getQuality

public int getQuality()

getRecord

public MfRecord getRecord()
Creates a new record based on the data stored in the MfCommand.
Overrides:
getRecord in interface MfCmd
Returns:
the created record.

getScaledHeight

public int getScaledHeight()

getScaledWidth

public int getScaledWidth()

getWeight

public int getWeight()

getWidth

public int getWidth()

isItalic

public boolean isItalic()

isStrikeout

public boolean isStrikeout()

isUnderline

public boolean isUnderline()

replay

public void replay(WmfFile file)
Replays the command on the given WmfFile.
Overrides:
replay in interface MfCmd
Parameters:
file - the meta file.

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.
Overrides:
scaleXChanged in interface 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.
Overrides:
scaleYChanged in interface MfCmd

setCharset

public void setCharset(int charset)

setClipPrecision

public void setClipPrecision(int clipprecision)

setEscapement

public void setEscapement(int escapement)

setFontFace

public void setFontFace(String facename)

setHeight

public void setHeight(int height)

setItalic

public void setItalic(boolean italic)

setOrientation

public void setOrientation(int orientation)

setOutputPrecision

public void setOutputPrecision(int outprecision)

setPitchAndFamily

public void setPitchAndFamily(int pitchAndFamily)

setQuality

public void setQuality(int quality)

setRecord

public void setRecord(MfRecord record)
Overrides:
setRecord in interface MfCmd

setStrikeout

public void setStrikeout(boolean so)

setUnderline

public void setUnderline(boolean ul)

setWeight

public void setWeight(int weight)

setWidth

public void setWidth(int width)

toString

public String toString()