CreateConvexShape
CreateConvexShape ShapeIndex, Size, NumbOfEdges
 
Parameters:

    ShapeIndex = The Index of the shape you wish to create
    Size = The size of this shape
    NumbOfEdges = The number of edges
Returns: NONE
 

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



FACTS:


      * Shape builds a convex shape.



Mini Tutorial:


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


  
; Define a variable, and grab a free shape Index
  MyShape = GetFreeShape()
  
; Create a Convex MySHape, of size 50, with 6 edges
  CreateConvexShape MyShape,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 would output.

  
  no Text output
  

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


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