User Guide
draw() 297
Although many network operations can be active at one time, running more than four concurrent
operations usually slows down performance unacceptably.
Neither the Director movie’s cache size nor the setting for the Check Documents option affects
the behavior of the
downloadNetThing command.
Parameters
URL
Required. The URL of any object that can be downloaded: for example, an FTP or HTTP
server, an HTML page, an external cast member, a Director movie, or a graphic.
localFile Required. The pathname and filename for the file on the local disk.
Example
These statements download an external cast member from a URL to the Director application
folder and then make that file the external cast member named Cast of Thousands:
downLoadNetThing("http://www.cbDeMille.com/Thousands.cst", the \
applicationPath&"Thousands.Cst")
castLib("Cast of Thousands").fileName = the applicationPath&"Thousands.Cst"
See also
importFileInto(), netDone(), preloadNetThing()
draw()
Usage
-- Lingo syntax
imageObjRef.draw(x1, y1, x2, y2, colorObjOrParamList)
imageObjRef.draw(point(x, y), point(x, y), colorObjOrParamList)
imageObjRef.draw(rect, colorObjOrParamList)
// JavaScript syntax
imageObjRef.draw(x1, y1, x2, y2, colorObjOrParamList);
imageObjRef.draw(point(x, y), point(x, y), colorObjOrParamList);
imageObjRef.draw(rect, colorObjOrParamList);
Description
Image method. Draws a line or an unfilled shape with a specified color in a rectangular region of
a given image object.
This method returns a value of 1 if there is no error.
If the optional parameter list is not provided,
draw() 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 color object should contain an indexed color
value. For 16- or 32-bit images, use an RGB color value.
To fill a solid region, use the
fill() method.
Parameters
x1 Required if drawing a line using x and y coordinates. An integer that specifies the x coordinate
of the start of the line.
y1 Required if drawing a line using x and y coordinates. An integer that specifies the y coordinate
of the start of the line.