Class MfCmdCreateFont
- java.lang.Object
-
- org.pentaho.reporting.libraries.pixie.wmf.records.MfCmd
-
- org.pentaho.reporting.libraries.pixie.wmf.records.MfCmdCreateFont
-
public final 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
Fields Modifier and Type Field Description static int
CHARSET_ANSI
static int
CHARSET_DEFAULT
static int
CHARSET_OEM
static int
CHARSET_SHIFTJIS
static int
CHARSET_SYMBOL
-
Constructor Summary
Constructors Constructor Description MfCmdCreateFont()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
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)
String
toString()
-
Methods inherited from class org.pentaho.reporting.libraries.pixie.wmf.records.MfCmd
applyScaleX, applyScaleY, getScaledHeight, getScaledWidth, getScaledX, getScaledY, scaleRect, setScale
-
-
-
-
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
-
-
Method Detail
-
replay
public void replay(WmfFile file)
Replays the command on the given WmfFile.
-
getInstance
public MfCmd getInstance()
Creates a empty unintialized copy of this command implementation.- Specified by:
getInstance
in classMfCmd
- Returns:
- a new instance of the command.
-
getRecord
public MfRecord getRecord()
Creates a new record based on the data stored in the MfCommand.
-
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.
-
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 classMfCmd
- Returns:
- the function identifier.
-
setFontFace
public void setFontFace(String facename)
-
getFontFace
public 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 classMfCmd
-
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 classMfCmd
-
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()
-
-