SaveShape
SaveShape Filename$, ShapeIndex
 
Parameters:

    Filename$ = The Filename of the shape you wish to save
    ShapeIndex = The Index of the shape
Returns: NONE
 

      SaveShape saves an shape playbasics memory to disc. You must provide this command with the full folder path and filename of the shape you wish to save, as well as the shapes index.



FACTS:


     * Load + Save Shape are part of the Shape extension Library. In order to use them, make sure you include the shape extension library at the top of your program if you need them. Eg. #include "Shape"



Mini Tutorial:


      This example creates a convex shape, saves it disc and the reloads it using the Load and save shape commands

  
; Include the Shape extension library
  #Include "Shape"
  
; Create a convert shape.
  CreateConvexShape 1,50,7
  
; The Filename of our test load/save file
  Filename$="C:Test_PlayBasic_LoadAndSaveShape.Dat"
  
  
; Save the shape to the C: drive
  SaveShape Filename$,1
  
  
; ReLoad the shape file as shape 2
  LoadShape Filename$,2
  
  
; Display the shapes
  DrawShape 1,100,100,2
  DrawShape 2,300,100,2
  
  
; Delete the temp file,
  DeleteFile Filename$
  
  
; Refresh the screen abnd wait for a key press
  Sync
  WaitKey
  



This example would output.

  
  no Text output
  

 
Related Info: CopyShape | CreateConvexShape | CreateShape | LoadShape | NewConvexShape | NewShape :
 


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