Previous Document Next Document
Layer.CreatePolygon

Function CreatePolygon(Left As Double, Top As Double, Right As Double, Bottom As Double, Sides As Long, [SubPaths As Long = 1], [Complexity As Long = 1], [Star As Boolean = False], [StarComplexity As Long = 50], [MaxComplexity As Long = 100]) As Shape

Member of Layer

The CreatePolygon method creates a new polygon.

Parameters
Description
Left
Specifies the distance from the left side of the polygon to the left side of the page frame. The value is measured in document units.
Top
Specifies the distance from the top of the polygon to the top of the page frame. The value is measured in document units.
Right
Specifies the distance from the right side of the polygon to the right side of the page frame. The value is measured in document units.
Bottom
Specifies the distance from the bottom of the polygon to the bottom of the page frame. The value is measured in document units.
Sides
Specifies the number of sides in the polygon. A polygon can have 3 to 500 sides in CorelDRAW.
SubPaths
Specifies the number of subpaths in the polygon
This parameter is optional, and its default value is 1.
Complexity
This parameter is optional, and its default value is 1.
Star
Specifies whether the polygon appears as a star shape on the layer
This parameter is optional, and its default value is False.
StarComplexity
This parameter is optional, and its default value is 50.
MaxComplexity
This parameter is optional, and its default value is 100.

The following code example creates a star on the active layer:

Sub Test() 
 ActiveLayer.CreatePolygon 0, 3, 3, 0, 5, 1, 1, True 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.