AutoSplinePolygon Object

The AutoSplinePolygon object contains the properties of a spline polygon. Spline polygons are created with the AutoShapes collection AddSplinePolygon method.

Derived from: AutoShape object (All methods and properties of AutoShape apply to this object.)

Properties

Fill

Line

Vertices

Example

The following example shows how to create a spline polygon.

Sub Main

 'Declares GrapherApp as an object

  Dim GrapherApp As Object

 

 'Creates an instance of the Grapher Application object

 'and assigns it to the variable named "GrapherApp"

  Set GrapherApp = CreateObject("Grapher.Application")

 

 'Make Grapher visible

  GrapherApp.Visible = True

 

 'Declare Docs as Object

  Dim Docs As Object

 

 'Assigns the Documents collection to

 'the variable named "Docs"

  Set Docs = GrapherApp.Documents

 

 'Declare Plot As Object

  Dim Plot As Object

 

 'Creates a new plot window and assigns it

 'to the variable named "Plot"

  Set Plot = Docs.Add(grfPlotDoc)

 

 'Declare Shapes As Object

  Dim Shapes As Object

 

 'Assigns the AutoShapes collection to

 'the variable named "Shapes"

  Set Shapes = Plot.Shapes

 

 'Add SplinePolygon

  Dim SplinePolygon As Object

  Dim SplinePolygonCoords(5) As Double

  SplinePolygonCoords(0) = 4: SplinePolygonCoords(1) = 1

  SplinePolygonCoords(2) = 7: SplinePolygonCoords(3) = 3

  SplinePolygonCoords(4) = 2: SplinePolygonCoords(5) = 6

  Set SplinePolygon = Shapes.AddSplinePolygon(SplinePolygonCoords)

End Sub