home *** CD-ROM | disk | FTP | other *** search
/ Sunday Savers: Sharing Fun! I Know My Savior Lives / Sunday Savers: Sharing Fun! I Know My Savior Lives.iso / mac / Xtras / PrintOMatic MX 1.7.3 / PrintOMatic MX (Win32) / -PrintOMatic MX Demo.dir / 00035.txt < prev    next >
Encoding:
Text File  |  2004-04-06  |  3.3 KB  |  71 lines

  1. Drawing Graphic Elements
  2.  
  3. The following routines are used to draw graphic elements on the pages of documents:
  4.  
  5.     drawRect            draws a filled or stroked rectangle
  6.     drawLine            draws a line
  7.     drawRoundRect        draws a filled or storked round rect
  8.     drawOval            draws a filled or stroked oval
  9.     drawText            draws a line of text
  10.     drawPicture            draws a picture from the cast or from disk
  11.     drawStagePicture    draws a picture of the Stage contentsdrawRect
  12.  
  13. Syntax:    drawRect document, rect, filled
  14.  
  15. Draws a rectangle on the current page. If the filled parameter is TRUE, the rectangle is filled using the current color. Otherwise, the rectangle is stroked using the current line weight and color.
  16.  
  17. Example:
  18.  
  19.     drawRect doc, Rect(0,0,500,100), TRUEdrawLine
  20.  
  21. Syntax:    drawLine document, startPoint, endPoint
  22.  
  23. Draws a line on the current page from startPoint to endPoint. The line is stroked using the current line weight and color.
  24.  
  25. Example:
  26.  
  27.     drawLine doc, Point(0,100), Point(getPageWidth(doc),100), TRUEdrawRoundRect
  28.  
  29. Syntax:    drawRoundRect document, rect, cornerRadius, filled
  30.  
  31. Draws a rounded-corner rectangle on the current page, using the corner radius specified in cornerRadius. If the filled parameter is TRUE, the rounded rectangle is filled using the current color. Otherwise, the rounded rectangle is stroked using the current line weight and color.
  32.  
  33. Example:
  34.  
  35.     drawRoundRect doc, Rect(0,0,500,100), 25, FALSEdrawOval
  36.  
  37. Syntax:    drawOval document, bounds, filled
  38.  
  39. Draws an oval on the current page, bounded by the rectangle specified in bounds. If the filled parameter is TRUE, the oval is filled using the current color. Otherwise, the oval is stroked using the current line weight and color.
  40.  
  41. Example:
  42.  
  43.     drawOval doc, Rect(0,0,100,100), FALSEdrawText
  44.  
  45. Syntax:    drawText document, text, location
  46.  
  47. Draws a line of text on the current page, using the current text font, size, style, and justification. The justification specified using setTextJust determines how the text is aligned relative to the point specified in location.
  48.  
  49. Example:
  50.  
  51.     drawText doc, "A little bit of text.", Point(100,50)drawPicture
  52.  
  53. Syntax:    drawPicture document, [ fileName | member castMem ],         [ rect | topLeftPoint ]
  54.  
  55. Draws a bitmapped or PICT cast member, EPS, PICT or BMP file from disk on the current page. If a destination rect is specified, the picture will be sized to fit within the rectangle without distortion. If a topLeftPoint is specified, the image will be drawn at 100% size from the specified point.
  56.  
  57. Examples:
  58.  
  59.     drawPicture doc, member "image", Point(100,50)
  60.     drawPicture doc, the pathName&"image.eps", Rect(0,0,100,100)
  61.  
  62. drawStagePicture
  63.  
  64. Syntax:     drawStagePicture document, [ rect | topLeftPoint ],         [ clipRect], grabOffscreen
  65.  
  66. Places a screen shot of the stage contents on the current page (or MIAW contents if drawStagePicture is called from a movie-in-a-window). If a clipRect is specified, only that portion of the stage or MIAW will be grabbed. Note that drawStagePicture takes a "faithful" screen grab of the stage contents, including the cursor, sprite "trails", and any other windows that might overlap the stage. However, if grabOffscreen is TRUE, the stage picture will be grabbed from Director's off-screen buffer instead, and these extraneous elements will not be included in the resulting picture.
  67.  
  68. Examples:
  69.  
  70.     drawStagePicture doc, Point(0,0)
  71.     drawStagePicture doc, Point(0,0), Rect(0,0,100,300), TRUE