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 . Guide To CA-Clipper - <b>gline()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 GLINE()
 Draw a line in graphic mode
------------------------------------------------------------------------------
 Syntax

     GLINE(<nXStart>, <nYStart>, <nXEnd>, <nYEnd>,
        [<nColor>], [<nMode>]) --> NIL

 Arguments

     <nX1>, <nY1>, <nX2>, and <nY2> define the line
     coordinates in pixels.

     <nColor> is a numeric value representing the display color.  If the
     parameter is missing, the last color specified in a call to a CA-Clipper
     function is used.  The range of values is limited to the number of
     colors available in the selected video mode.  In 16-color modes, valid
     values are between 0 and 15.  In 256-color modes, valid values are
     between 0 and 255.

     Display Mode Constants
     ------------------------------------------------------------------------
     Constant       Description
     ------------------------------------------------------------------------
     LLG_MODE_SET   Display in SET mode (ignores any pixels present under the
                    line displayed).  This is the most common display mode.
     LLG_MODE_AND   Display in AND mode (executes an AND on pixels present
                    under the line at display time and on the display color).
     LLG_MODE_OR    Display in OR mode (executes an OR on pixels present
                    under the line at display time and on the display color).
     LLG_MODE_XOR   Display in XOR mode (executes an XOR on pixels present
                    under the line at display time and on the display color).
                    See note.
     ------------------------------------------------------------------------

     Note:  This method allows you to move objects around on the screen
     without damaging the background.  To retrieve the initial background,
     just repeat the call for display in XOR mode.  If the display mode
     parameter is missing, the last mode specified in a call to a CA-Clipper
     graphic function is used.

 Returns

     GLINE() always returns NIL.

 Description

     GLINE() draws lines on the screen and respects the constraints defined
     by GSETCLIP().  This function can be used only if you have set the
     screen to a graphic mode using SET VIDEOMODE.

 Examples

     .  This example displays a line in a region restricted by
        clipping:

        // Switch to graphic mode
        SET VIDEOMODE TO LLG_VIDEO_VGA_640_480_16
        // Restrict the display region to a portion of the screen
        GSETCLIP(100, 100, 300, 300)
        // Draw a line using color 6
        GLINE(0, 0, 400, 400, 6, LLG_MODE_SET)
        QUIT                           // End of application

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


See Also: GBMPDISP() GLINE() GRECT() GWRITEAT()

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