GetShapeEdges
NumberOfEdges = GetShapeEdges(ShapeIndex, [EdgeSelect=0])
 
Parameters:

    ShapeIndex = The Index of the shape you wish to query
    [EdgeSelect=0] = A toggle to select the total available edges, or the highest used edge
Returns:

    NumberOfEdges = The number of edges in this shape
 

      The GetShapeEdges function can return two edge values. It can either return the total number of edges a shape has, or the highest edge index that is in use.

      The EdgeSelect parameter is optional and defaults to zero, in this mode the command returns the max number of edges in this shape, when it's set to one, the function returns the highest used edge.



FACTS:


      * If no edges are defined, the function will return a highest used as -1




Mini Tutorial:


      This example displays the max and used number of edges and vertex.


  
  
; Create a new shape with space for 5 vertex and 10 edges
  MyShape=NewShape(5,10)
  
; Set edge 6 (out of 10) to use vertex 3 and 4
  SetShapeEdge MyShape,6,3,4
  
; Display the number of Vertex
  Print "Numb Of Vertex:"+Str$(GetShapeVerts(MyShape,0))
  Print "Highest Used Vertex:"+Str$(GetShapeVerts(MyShape,1))
  
; Display the number of edges
  Print "Numb Of Edges:"+Str$(GetShapeEdges(MyShape,0))
  Print "Highest Used Edge:"+Str$(GetShapeEdges(MyShape,1))
  
  
; Display the screen and wait for the user to press a key
  Sync
  WaitKey
  
  




This example would output.

  
  Numb Of Vertex:5
  Numb Of Used Vertex:4
  Numb Of Edges:10
  Numb Of Used Edges:6
  

 
Related Info: CreateShape | GetShapeVerts | NewShape | ResizeShape :
 


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