NewConvexShape
ShapeIndex = NewConvexShape(Size, NumbOfEdges)
 
Parameters:

    Size = The size of this shape
    NumbOfEdges = The number of edges
Returns:

    ShapeIndex = The Index of the shape you wish to create
 

     The NewConvexShape() function initializes a pre-built shape. The shape is built by generating points on a circle, where you define both the size (the radius of this circle) and the number of points/edges to connect to form this shape.



FACTS:


     * NewConvexShape builds a convex shape.




Mini Tutorial:


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


  
; Create a new 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
  
; Display the screen and wait for a key press
  Sync
  WaitKey
  




This example outputs.





 
Related Info: CreateConvexShape | CreateShape | GetShapeStatus | LoadShape | NewShape | SaveShape | ShapeQuantity :
 


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