Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Sunshow Pro V3.0 - <b>drawbeveledbox()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DrawBeveledBox()

Draw a 3-D beveled box in graphic mode


Syntax

DrawBeveledBox(<nFontHeight>, <nForegroundIndex>, ;
   <nBackgroundIndex>, <nLightColor>, <nShadowColor>, ;
   <nBoxColor>, <nTopLeftRow>, <nTopLeftCol>, ;
   <nBottomRightRow>, <nBottomRightCol>)


Arguments

<nFontHeight>
Font height in pixels. Must be greater than 7 and less than the vertical 
resolution.

<nForegroundIndex>
The foreground color index (box interior). Usually dark grey (index 8).

<nBackgroundIndex>
The background color index (box face). Usually dark grey (index 8).

<nLightColor>
The beveled edge highlight color, usually bright white (index 15).

<nShadowColor>
The beveled edge shadow color, usually dark grey (index 8).

<nBoxColor>
The color of the box edges, usually black (index 0).

<nTopLeftRow>
Top left row of beveled box to draw.

<nTopLeftCol>
Top left column of beveled box to draw.

<nBottomRightRow>
Bottom right row of beveled box to draw.

<nBottomRightCol>
Bottom right column of beveled box to draw.


Returns

0
Success.

-1
DrawBeveledBox() can only draw in graphic modes.

-2
Font size to small.

-8
Can not allocate memory for line buffer.

-99
Parameters are invalid.


Remarks

DrawBeveledBox() draws a 3-D beveled box specified by (<nTopLeftRow>, 
<nTopLeftCol>), (<nBottomRightRow>, <nBottomRightCol>), and <nFontHeight> 
with specified colors.


Example

This example displays an image, clears a box (defined by (8,7)x(14,34)) 
to color 7 (light grey in the default 16 color palette), draws a 3D 
beveled box around the cleared area, displays graphic mode text within 
the 3D box.

nStatus = ShowPCX("ASMUSSEN.PCX")
nStatus = Sleep(4)
nStatus = ClearWin(7, 8, 9, 8, 13, 33)
nStatus = DrawBeveledBox(8, 7, 7, 15, 8, 0, 8, 7, 14, 34)
nStatus = SunSay(10, 9, 8, 0, 7, "", ;
    "Lake Asmussen, Sweden")
nStatus = SunSay(11, 9, 8, 0, 7, "", ;
    "320x200x256 PCX image")
nStatus = Sleep(4)
nStatus = TextMode()

For other examples of how to use the DrawBeveledBox() function, see 
SUNMOUSE.PRG, an example program distributed with Sunshow Pro.



See Also: DrawInButton() DrawOutButton()

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