Class 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;

    • 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​(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 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()