home *** CD-ROM | disk | FTP | other *** search
/ Painter Bear's Language Bridge — Italian / Bridge_ponte_itialian.iso / pc / xtras / -pmatic.dir / docs_9.txt < prev    next >
Encoding:
Text File  |  1999-09-22  |  3.5 KB  |  95 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 contents
  12.     
  13.  
  14. drawRect
  15.  
  16.  Syntax:    drawRect document, rect, filled
  17.  
  18. 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.
  19.  
  20. Example:
  21.  
  22.     drawRect doc, Rect(0,0,500,100), TRUE
  23.  
  24.  
  25. drawLine
  26.  
  27.  Syntax:    drawLine document, startPoint, endPoint
  28.  
  29. Draws a line on the current page from startPoint to endPoint. The line is stroked using the current line weight and color.
  30.  
  31. Example:
  32.  
  33.     drawLine doc, Point(0,100), Point(getPageWidth(doc),100), TRUE
  34.  
  35.  
  36. drawRoundRect
  37.  
  38.  Syntax:    drawRoundRect document, rect, cornerRadius, filled
  39.  
  40. 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.
  41.  
  42. Example:
  43.  
  44.     drawRoundRect doc, Rect(0,0,500,100), 25, FALSE
  45.  
  46.  
  47. drawOval
  48.  
  49.  Syntax:    drawOval document, bounds, filled
  50.  
  51. 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.
  52.  
  53. Example:
  54.  
  55.     drawOval doc, Rect(0,0,100,100), FALSE
  56.  
  57.  
  58. drawText
  59.  
  60.  Syntax:    drawText document, text, location
  61.  
  62. 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.
  63.  
  64. Example:
  65.  
  66.     drawText doc, "A little bit of text.", Point(100,50)
  67.  
  68.  
  69. drawPicture
  70.  
  71.  Syntax:    drawPicture document, [ fileName | member castMem ],
  72.              [ rect | topLeftPoint ]
  73.  
  74. 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.
  75.  
  76. Examples:
  77.  
  78.     drawPicture doc, member "image", Point(100,50)
  79.     drawPicture doc, the pathName&"image.eps", Rect(0,0,100,100)
  80.  
  81.  
  82. drawStagePicture
  83.  
  84.  Syntax:    drawStagePicture document, [ rect | topLeftPoint ],
  85.              [ clipRect], grabOffscreen
  86.  
  87. 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.
  88.  
  89. Examples:
  90.  
  91.     drawStagePicture doc, Point(0,0)
  92.     drawStagePicture doc, Point(0,0), Rect(0,0,100,300), TRUE
  93.  
  94.  
  95.