Previous Document Next Document

Object Model Reference : Classes : L : Layer : Methods : Layer.CreatePolygon


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

Description

Member of Layer

The CreatePolygon method creates a new polygon at a specified location on a layer.

Parameter
Description
Left
Specifies, in document units, the distance from the left side of the polygon to the left side of the page frame
Top
Specifies, in document units, the distance from the top of the polygon to the top of the page frame
Right
Specifies, in document units, the distance from the right side of the polygon to the right side of the page frame
Bottom
Specifies the distance from the bottom of the polygon to the bottom of the page frame. This value is measured in document units.
Sides
Specifies the number of sides in the polygon, from 3 to 500.
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. 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.

VBA example

The following VBA 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 2013 Corel Corporation. All rights reserved.