DrawShape
DrawShape ShapeIndex, Xpos, Ypos, FillMode
 
Parameters:

    ShapeIndex = The Index of the shape you wish to create
    Xpos = The X coordinate to draw this shape at
    Ypos = The Y coordinate to draw this shape at
    FillMode = The drawing mode to use
Returns: NONE
 

      DrawShape draws a shape to the current surface in the current ink colour. The shape can be drawn in various ways (point,edge and filled).


      [ FillModes ]
            0 = Draw shapes vertex only (Dot)
            1 = Draw shapes edges only (Line)
            2 = Draw filled shape
            3 = Draw shape edges + Edge Normals

      Sample picture bellow.




FACTS:


      * Draw a shape in the current ink colour. The shape will be drawn using the current Ink colour and InkMode.



Mini Tutorial:


      This example creates a convex shape and then draws it in point, edge and filled form.


  
; Create a Convex SHape, of size 50, with 6 edges
  MyShape=NewConvexShape(50,6)
  
; Draw the shapes points
  CenterText 100,20,"Shape Vertex"
  DrawShape MyShape,100,100,0
  
; Draw the outline (edges) of this shape
  CenterText 250,20,"Shape Edges"
  DrawShape MyShape,250,100,1
  
; Draw the Filled shape
  CenterText 400,20,"Filled Shape"
  DrawShape MyShape,400,100,2
  
  
; Draw the shape normals
  CenterText 550,20,"Shape Normals"
  DrawShape MyShape,550,100,3
  
; Display the screen and wait for a key press
  Sync
  WaitKey
  




      This example outputs,





 
Related Info: CreateShape | GetShapeStatus | Ink | InkMode | LoadNewShape | LoadShape | NewConvexShape | NewShape | SaveShape :
 


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