Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Technical Reference - <b>_gwriteat()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _gWriteAt()
 Draw graphic text without background
------------------------------------------------------------------------------
 C Prototype

     #include "llibg.api"
     int _gWriteAt(
                    int iX,
                    int iY,
                    DWORD dwFontColor,
                    int iFontID,
                    char far * fpString,
                    int iMode,
                    int iAttribute
                  )

 Arguments

     iX is the pixel-based X coordinate of the starting point.

     iY is the pixel-based Y coordinate of the starting point.

     dwFontColor is the font color.  The range of valid values is limited
     to the number of colors available in the selected video mode.  For
     example, in 16-color modes, valid values are between zero and 15, and in
     256-color modes, valid values are between zero and 255.

     iFontID is the font handle.

     fpString is a pointer to the display text.

     iMode is the display mode, which you specify using one of the
     following values:

     Display Mode Constants
     ------------------------------------------------------------------------
     Constant            Display Mode
     ------------------------------------------------------------------------
     LLG_MODE_SET        Overwrite existing pixels that are beneath where the
                         string will be displayed.  This is the most common
                         display mode.
     LLG_MODE_AND        Perform a logical AND on existing pixels--and on the
                         display color--that are beneath where the string
                         will be displayed.
     LLG_MODE_OR         Perform a logical OR on existing pixels--and on the
                         display color--that are beneath where the string
                         will be displayed.
     LLG_MODE_XOR        Perform a logical XOR on existing pixels--and on the
                         display color--that are beneath where the string
                         will be displayed (see Note below).
     LLG_MODE_NO_DISPLAY Compute the width of the string without displaying
                         anything on the screen.  Be aware that .FNT fonts
                         are proportional (e.g., an "m" and an "i" do not use
                         the same number of pixels).
     ------------------------------------------------------------------------

     Note:  LLG_MODE_XOR allows you to move objects around on the screen
     without damaging the background.  To retrieve the initial background,
     simply repeat the function call using the XOR display mode.

     iAttribute is the font attribute, which you specify using one or
     more of the following values:

     Font Attribute Constants
     ------------------------------------------------------------------------
     Constant            Font Attribute
     ------------------------------------------------------------------------
     LLG_FONT_BOLD       Bold
     LLG_FONT_ITALIC     Italic
     LLG_FONT_UNDERLINE  Underline
     ------------------------------------------------------------------------

     To specify more than one attribute, simply add the values together.
     Note also that you can specify a value of zero for this parameter if you
     do not want to specify any font attributes.

 Returns

     The length of *fpString in pixels.

 Notes

     .  Restrictions:  You cannot use this function unless you have
        set the screen to one of the graphic modes using _gModeSet().  This
        function respects the screen clipping region as set by _gClipSet().

 Files   Library is LLIBG.LIB, header file is Llibg.api.


See Also: _gClipSet() _gFntLoad() _gFntSet() _gModeSet()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson