
Document functions
115
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
,
controlPointLast
,
bCopyAttrs
)
Arguments
controlPointFirst
,
mjainPoint
,
and
controlPointLast
Points that specify the
x,y
coordinates of the preceding control point, the main point, and the following control point of the
Bézier path (see
“Point data type” on page 11
).
bCopyAttrs
If
bCopyAttrs
is
false
, the path’s stroke and fill are copied directly from the
document’s current stroke and fill settings. If it is
true
, the path’s fill is set to None, and the brush
is set to something other than None.
Returns
Nothing.
Description
Adds a new path that consists of a single Bézier point. The path uses the default fill, stroke, and so
on, and is added on the current frame and layer. The point is selected after it is added.
Example
The following command adds a new path that consists of a single Bézier point at the specified
coordinates and copies the path’s stroke and fill from the document’s current stroke and
fill settings.
fw.getDocumentDOM().addNewSinglePointPath({x:150, y:63}, {x:150, y:63},
{x:150, y:63}, false);
Содержание DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER
Страница 1: ...Extending Fireworks...
Страница 4: ...4 Contents...
Страница 8: ...8 Chapter 1 Extending Fireworks Overview...
Страница 102: ...102 Chapter 4 Auto Shapes...
Страница 284: ...284 Chapter 5 Fireworks JavaScript API...