home *** CD-ROM | disk | FTP | other *** search
/ Op verkenning van het heelal / CD-ROM.BIN / XTRAS / DRAWXTRA.X32 / TEXT / TEXT_FUNCTIONNAMES next >
Text File  |  1998-11-20  |  5KB  |  122 lines

  1. List of DrawXtra functions:
  2.  
  3.  
  4. --- Color Functions ----
  5.  
  6. SetForecolor( <member>, <integer red>, <integer blue>, <integer green> )
  7.     Sets the foreground color for all drawing operations.
  8.  
  9. SetForecolor( <member>, <integer packedColor> )
  10.     Sets the foreground color, using a ╥packed╙ color (see the help for a detailed discussion of using packed colors) for all drawing operations.
  11.  
  12. GetRedClor(<member>, <integer packedColor> )
  13.     Extracts the red channel value of a packed color.
  14.  
  15. GetBlueColor( <member>, <integer packedColor> )
  16.     Extracts the blue channel value of a packed color.
  17.  
  18. GetGreenColor( <member>, <integer packedColor> )
  19.     Extracts the blue channel value of a packed color.
  20.  
  21. PackColor( <member>, <integer red>, <integer green>, <integer blue> )
  22.     Creates a packed color.
  23.     
  24. IndexedToPackedColor( <member>, <integer indexedColor> )
  25.     Creates a packed color from an indexed color
  26.     
  27. PackedToIndexedColor( <member>, <integer packedColor> )
  28.     Creates an indexed color from a packed color
  29.     
  30.  
  31. -- Angle & Endpoint functions
  32.  
  33. PointToVector( <DrawXtra member>, <integer x1>, <integer y1>, <integer x2>, <integer y2> )
  34.  
  35. This will calculate the angle and the magnitude (length of the line segment) of a line given its start point and end point. The return value will be a point structure with the angle being the 1st element in the structure and the magnitude as the 2nd element. 
  36.  
  37. VectorToPoint( <DrawXtra member>, <integer x1>, <integer y1>, <integer angle>, <integer magnitude> )
  38.  
  39. This will calculate the endpoint of a line give its start point, magnitude and angle. The return value will be a point structure with the x-coordinate being the 1st element in the structure and the y-coordinate as the 2nd element.
  40.  
  41.  
  42. GetImage( <DrawXtra member>, <member (bitmap)> )
  43.     Copy the bitmap stored in the canvas to a bitmap castmember. Director only.
  44.  
  45. SetImage( <DrawXtra member>, <member (bitmap)>, <string mappingMode> )
  46.     Copy the bitmap from a bitmap castmember to the canvas. The canvas
  47. will be resized to the dimensions of the bitmap.  mappingMode can equal
  48. "fixed" or "stretch". Director only.
  49.  
  50. SaveImage( <DrawXtra member>, <string pathname>, [<string mixImportFilter>] )
  51.     Save the canvas image to either a PICT file (Macintosh) or BMP file
  52. (Windows). The format tag is optional and may describe a MIX format.
  53.  
  54. LoadImage( <DrawXtra member>, <string pathname> )
  55.     Loads the canvas image. We may tap into the Mix filters here.
  56.  
  57. DrawImage( <DrawXtra member>, <member (bitmap)>, <integer x>, <integer y> )
  58.     Places a bitmapped castmember onto the canvas with (x, y) specifying the upper-left corner of the image.
  59.  
  60. DrawImage( <DrawXtra member>, <string filename>, <integer x>, <integer y> )
  61.     Places an image onto the canvas with (x, y) specifying the upper-left corner of the image.
  62.  
  63. --- Manipulating the drawing area ---
  64.     
  65. Clear( <member> )
  66.     Erases all of the contents of the canvas so that it is white.
  67.  
  68. Resize( <member>, <integer width>, <integer height> )
  69.     Resizes the canvas. This will also clear out any images in the canvas.
  70.  
  71. Redraw( <member> )
  72.     Force the canvas to redraw itself. When making drawings, they will
  73. not show up on the stage until Redraw() gets called.
  74.  
  75. --- Drawing objects ---
  76.  
  77. SetPixel( <member>, <integer x>, <integer y> )
  78.     Draw a pixel on the canvas at the specified location.
  79.  
  80. GetPixel( <member>, <integer x>, <integer y> )
  81.     Gets the RGB value of a pixel at the specified location, returning a ╥packed╙ color. The return value will be -1 if the specified point is not in the canvas.
  82.  
  83. DrawLine( <member>, <startX>, <startY>, <endX>, <endY> )
  84. DrawSingleArrow( <member>, <startX>, <startY>, <endX>, <endY> )
  85. DrawDoubleArrow( <member>, <startX>, <startY>, <endX>, <endY> )
  86.     Draws a line w/a single or double arrow from one point to another.
  87. When calling SingleArrow(), the arrowhead will be attached to end of the
  88. line.
  89.  
  90. DrawVector( <DrawXtra member>, <integer x1>, <integer y1>, <integer angle>, <integer magnitude> )
  91.     Draws a 2D vector using the angle & magnitude (length) of the line to determine the endpoint.
  92.  
  93. Fill( <member>, <integer x>, <integer y> )
  94.     Performs a paint bucket fill at the specified point.
  95.  
  96. DrawFramedRectangle( <member>, <left>, <top>, <right>, <bottom> )
  97. DrawFilledRectangle( <member>,  <left>, <top>, <right>, <bottom> )
  98.     Draws a framed/filled rectangle.
  99.     
  100. DrawFramedSquare( <member>, <left>, <top>, <edgeSize> )
  101. DrawFilledSquare( <member>,  <left>, <top>, <edgeSize> )
  102.     Draws a framed/filled square.
  103.  
  104. DrawFramedEllipse( <member>, <left>, <top>, <right>, <bottom> )
  105. DrawFilledEllipse( <member>, <left>, <top>, <right>, <bottom> )
  106.     Draws a framed/filled ellipse.
  107.  
  108. DrawFramedCircle( <member>, <left>, <top>, <diameter> )
  109. DrawFilledCircle( <member>, <left>, <top>, <diameter> )
  110.     Draws a framed/filled circle.
  111.  
  112. DrawText( <member>, <x>, <y>, <string text> )
  113.     Draws text. At coordinate (x,y).
  114.  
  115. DrawArc( <member>, <left>, <top>, <right>, <bottom>, <x1>, <y1>, <x2>, <y2> )
  116.     Draws an arc bounded by the rectangle defined by the left, top, right and bottom points. Point (x1,y1) defines the starting point of the arc and (x2,y2) defines the end point of the arc.
  117.  
  118. DrawFramedRoundRect( <member>, <left>, <top>, <right>, <bottom> )
  119.     Draws a rectangle with rounded corners.
  120.  
  121. DrawFilledRoundRect( <member>, <left>, <top>, <right>, <bottom> )
  122.     Same as DrawFramedRoundRect() only the shape will be filled.