Class MfCmdExtTextOut


  • public class MfCmdExtTextOut
    extends MfCmd
    The ExtTextOut function draws text using the currently selected font, background color, and text color. You can optionally provide dimensions to be used for clipping, opaquing, or both.

    META_EXTTEXTOUT

    NEAREST API CALL

    #include <windows.h>
     BOOL32 ExtTextOutA
     (
     HDC32 hdc,
     INT32 x,
     INT32 y,
     UINT32 flags,
     const RECT32 *lprect,
     LPCSTR str,
     UINT32 count,
     const INT32 *lpDx
     );
     
    • Constructor Detail

      • MfCmdExtTextOut

        public MfCmdExtTextOut()
    • 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.
      • calcDeltaX

        protected int calcDeltaX​(int valign,
                                 int textWidth)
      • calcDeltaY

        protected int calcDeltaY​(int halign,
                                 FontMetrics fm)
      • 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.
      • 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.
      • setRecord

        public void setRecord​(MfRecord record)
        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.
      • getRecord

        public MfRecord getRecord()
        Creates a new record based on the data stored in the MfCommand. This writer does not write a char-spacing record.
        Specified by:
        getRecord in class MfCmd
        Returns:
        the created record.
      • setOrigin

        public void setOrigin​(int x,
                              int y)
      • getOrigin

        public Point getOrigin()
      • getScaledOrigin

        public Point getScaledOrigin()
      • isClipped

        public boolean isClipped()
      • isOpaque

        public boolean isOpaque()
      • getFlags

        public int getFlags()
      • setFlags

        public void setFlags​(int flags)
      • setClippingRect

        public void setClippingRect​(int cx,
                                    int cy,
                                    int cw,
                                    int ch)
      • getClippingRect

        public Rectangle getClippingRect()
      • getScaledClippingRect

        public Rectangle getScaledClippingRect()
      • setText

        public void setText​(String text)
      • getText

        public String getText()
      • scaleXChanged

        protected void scaleXChanged()
        Description copied from class: MfCmd
        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()
        Description copied from class: MfCmd
        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