ShadeBox
ShadeBox X1, Y1, X2, Y2, TopLeftColour, TopRightColour, BotRightColour, BotLeftColour
 
Parameters:

    X1 = The top left hand X coordinate of the box
    Y1 = The top left hand Y coordinate of the box
    X2 = The bottom right hand X coordinate of the box
    Y2 = The bottom right hand Y coordinate of the box
    TopLeftColour = The colour of the TOP LEFT hand corner of the box
    TopRightColour = The colour of the TOP RIGHT hand corner of the box
    BotRightColour = The colour of the BOTTOM RIGHT hand corner of this box
    BotLeftColour = The colour of the BOTTOM LEFT hand corner of this box
Returns: NONE
 

      ShadeBox draws a shaded filled rectangle to the current surface. The user specifies (in clock wise order) that colours of the four corners of the box. These colours will be gouraud shaded together, Allowing us to draw nice smooth shaded areas.





FACTS:


      * ShadeBox can only respond to some InkModes.

      * GouraudTri & GouraudQuad are the polygon equivalents of ShadeBox

      * ShadeBox will render to the current surface, except when the user has either CaptureToScene, or CaptureToWorld activated. In either situation the drawing request will be added to the scene or world queues.

      * ShadeBox outside of the current surfaces size or viewport will be clipped to the area.





Mini Tutorial:


      Draw some random Shaded boxes on the screen.

  
  
; Get the Current Width & Height of the screen
  sw=GetScreenWidth()
  sh=GetScreenHeight()
  
; Set up a FOR/NEXT loop to count from 0 to 100.
;  So the loop will draw 100 shaded boxes
  For lp =0 To 100
     
   ; Draw a Shaded Box to the screen of random size, and random colours.
     ShadeBox Rnd(sw),Rnd(sh),Rnd(sw),Rnd(sh),RndRGB(),RndRGB(),RndRGB(),RndRGB()
     
  Next
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



 
Related Info: Box | GouraudQuad | GouraudTri | InkMode | Quad | TextureQuad :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com