Lingo Dictionary
201
drag
Syntax
member(
whichCastmember
).modelResource(
whichModelResource
).drag
Description
3D
#particle
model resource property; indicates the percentage of each particle’s velocity that is
lost in each simulation step. This property has a range of 0 (no velocity lost) to 100 (all velocity
lost and the particle stops moving). The default value is 0.
Example
In this example, ThermoSystem is a model resource whose type is
#particle
. This statement sets
the
drag
property of ThermoSystem to 5, applying a large resistance to the motion of the
particles of ThermoSystem and preventing them from traveling very far.
member("Fires").modelResource("ThermoSystem").drag = 5
See also
wind
,
gravity
draw()
Syntax
imageObject
.draw(
x1
,
y1
,
x2
,
y2
,
colorObjectOrParameterList
)
imageObject
.draw(point(
x, y)
, point(
x, y)
,
colorObjectOrParameterList
)
imageObject
.draw(
rect
,
colorObjectOrParameterList
)
Description
This function draws a line or an unfilled shape of color
colorObject
in a rectangular region of
the given image object, as specified in any of the three ways shown. The
draw
returns a value of 1
if there is no error. You can use the optional property list
ParameterList
function to specify the
following shape properties:
If you do not provide a parameter list, this function draws a 1-pixel line between the first and
second points given or between the upper left and lower right corners of the given rectangle.
For best performance, with 8-bit or lower images the
colorObject
should contain an indexed
color value. For 16- or 32-bit images, use an RGB color value.
If you want to fill a solid region, use the
fill()
function.
Examples
This statement draws a 1-pixel, dark red, diagonal line from point (0, 0) to point (128, 86) within
the image of member Happy.
member("Happy").image.draw(0, 0, 128, 86, rgb(150,0,0))
Property
Description
#shapeType
A symbol value of #oval, #rect, #roundRect, or #line. The default is #line.
#lineSize
The width of the line to use in drawing the shape.
#color
A color object, which determines the color of the shape border.
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...