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>gframe()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 GFRAME()
 Draw a frame with a 3-D look
------------------------------------------------------------------------------
 Syntax

     GFRAME(<nXStart>, <nYStart>, <nXEnd>, <nYEnd>, <nColorBack>,
        <nColorLight>, <nColorDark>, <nWidthUp>, <nWidthRight>,
        <nWidthDown>, <nWidthLeft>, [<nMode>], [<nStyle>]) --> NIL

 Arguments

     <nXStart>, <nYStart>, <nXEnd>, and <nYEnd> define frame
     coordinates in pixels.

     <nColorBack> is a numeric value representing the display color of
     the border background.

     <nColorLight> is a numeric value representing the light display
     color for borders.

     <nColorDark> is a numeric value representing the dark display color
     for borders.

     The range of color values is limited to the number of colors available
     in the selected video mode.  In 16-color modes, valid values are 0-15.
     In 256-color modes, valid values are 0-255.

     <nWidthUp> is a numeric value representing the thickness of the
     frame borders.  The values <nWidthRight>, <nXStart>, <nYStart>, <nXEnd>,
     <nYEnd> are the external dimensions <nWidthDown> of the frame, and the
     width of the borders is measured <nWidthLeft> within the rectangle.

     <nMode> represents the frame mode.  The following are valid <nMode>
     values:

     Frame 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.
     ------------------------------------------------------------------------

     <nStyle> defines the style of the ellipse using one of the constants
     listed in the table below:

     Style Mode Constants
     ------------------------------------------------------------------------
     Constant     Description
     ------------------------------------------------------------------------
     LLG_FILL     Fills the frame with nColorBack.  This is the default.
     LLG_FRAME    Displays the frame in 3-D without filling in the frame with
                  nColorBack.
     ------------------------------------------------------------------------

     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
     function is used.

 Returns

     GFRAME() always returns NIL.

 Description

     GFRAME() draws box frames with a 3-D look using three appropriately
     selected colors.  For example, gray for the background, black for the
     dark color and white for the light color.  This function can be used
     only if you have set the screen to a graphic mode using GMODE().  This
     function respects the constraints defined by GSETCLIP().

 Examples

     .  This example shows how to display a series of frames with thin
        borders (3 pixels):

        Switch to graphic mode
        SET VIDEOMODE TO LLG_VIDEO_VGA_640_480_16
        // Buttons
        GFRAME(0, 0, 53, 399, 7, 15, 8, 3, 3, 3, 3, LLG_MODE_SET)
        // Coordinates
        GFRAME(0, 400, 53, 456, 7, 15, 8, 3, 3, 3, 3, LLG_MODE_SET)
        // Painting
        GFRAME(54, 0, 639, 399, 7, 15, 8, 3, 3, 3, 3, LLG_MODE_SET)
        // Palette
        GFRAME(54, 400, 639, 456, 7, 15, 8, 3, 3, 3, 3, LLG_MODE_SET)
        // Messages
        GFRAME(0, 457, 639, 479, 7, 15, 8, 3, 3, 3, 3, LLG_MODE_SET)
        QUIT                        // End of application

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


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

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