DeleteShapeEdge
DeleteShapeEdge ShapeIndex, EdgeIindex
 
Parameters:

    ShapeIndex = The Index of the shape you wish to change
    EdgeIindex = The index of the edge you wish to delete
Returns: NONE
 

DeleteShapeEdge allows the user change the number of the vertex and edges definitions a shape has. The command is sensitive to existing data, so when expanding the vertex/edge buffers, old data is not lost. However, if you reduce the number of vertex or edges, and one was in use, the you will loose that data.



FACTS:


* Shape Vertex indexes ranges between zero and MaxVertex-1
* Shape Edges indexes ranges between zero and MaxEdges-1




Mini Tutorial:


This example creates a box like shape manually and draws it, then removes an edges and draws the result.


  
; Define a variable, and grab a free shape Index
  MyShape = GetFreeShape()
  
; Create MySHape, with room for 10 vertex and
; 10 edge connections
  CreateShape MyShape,4,4
  
; Create some Box like vertex
  SetShapeVertex MySHape,0,-50,-50
  SetShapeVertex MySHape,1,50,-50
  SetShapeVertex MySHape,2,50,50
  SetShapeVertex MySHape,3,-50,50
  
; Connect the vertex together to form the Boxes
; edges
  SetShapeEdge MyShape,0,0,1
  SetShapeEdge MyShape,1,1,2
  SetShapeEdge MyShape,2,2,3
  SetShapeEdge MyShape,3,3,0
  
; Draw the shapes edges
  DrawShape MyShape,100,100,1
  
; Remove of the previously defined edges from this shape
  DeleteShapeEdge MyShape,3
  
; Draw the modified shape edges
  DrawShape MyShape,100,300,1
;Display
  Sync
  WaitKey
  
  




This example would output.

  
  no Text output
  

 
Related Info: CreateConvexShape | CreateShape | LoadShape | SaveShape :
 


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