Product Documentation
Virtuoso Layout Suite SKILL Reference
Product Version IC23.1, November 2023

vfoCreateShapeData

vfoCreateShapeData(
t_shapeType
[ @rest l_args ]
)
=> g_instance / nil

Description

Allocates, initializes, and returns an instance of the subclass of the vfoShapeData of the given shape type.

Arguments

t_shapeType

The string that describes the shape type. This can be path, rectangle, polygon, or line.

l_args

For path shape type, provide the list (width pointlist). For the rectangle shape type, provide the bbox values. For the polygon and line shape types, provide the pointlist.

Value Returned

g_instance

An initialized SKILL++ object of a subclass of the vfoShapeData is returned.

nil

The SKILL++ object of a subclass of the vfoShapeData is not returned.

Example

In the above example, the points of the chop shape are specified using the shapeData function.

shapeData = vfoCreateShapeData("rect" '((2 2) (3 1)))
    => stdobj@0x148e90d8
className(classOf(shapeData))
    => vfoRectShapeData
shapeData = vfoCreateShapeData("polygon" '((5 0) (0 0) (0 6)))
className(classOf(shapeData))
    => vfoPolygonShapeData

Return to top
 ⠀
X