41
EXTENDING FIREWORKS
The Document object
Las
t
up
d
a
ted
12/8/2009
See also
dom.addNewRectanglePrimitive()
dom.addNewRectanglePrimitive()
Availability
Fireworks 4.
Usage
dom.addNewRectanglePrimitive(
boundingRectangle, roundness
)
Arguments
boundingRectangle
A rectangle that specifies the bounds within which the new rectangle primitive is added (see
“
Rectangle data type
” on page 8).
roundness
A floating-point value between 0 and 1 that specifies the “roundness” to use for the corners (0 is no
roundness, and 1 is 100% roundness).
Returns
Nothing.
Description
Adds a new rectangle primitive that fits in the specified bounds. The rectangle primitive uses the document’s current
default path attributes, is added on the current frame and layer, and has several editable properties, such as corner
roundness and transformation. The difference between a rectangle and a rectangle primitive is that a rectangle is a path
that is shaped like a rectangle, and a rectangle primitive preserves its rectangular quality; that is, if you drag a corner,
it remains a rectangle rather than becoming a quadrilateral.
Example
The following command adds a new rectangle primitive with no round corners within the specified coordinates:
fw.getDocumentDOM().addNewRectanglePrimitive({left:0, top:0, right:100, bottom:100}, 0);
See also
dom.addNewRectangle()
,
fw.ungroupPrimitives()
dom.addNewSinglePointPath()
Availability
Fireworks 3.
Usage
dom.addNewSinglePointPath(
controlPointFirst, mainpoint, controlPointLast, bCopyAttrs
)