Properties

Almost all properties of the DrawXtra cast member can be easily set in the Properties Dialog box, which is displayed when you double-click the cast member icon in the cast window. These properties can also be set via Lingo.

canvasWidth - the width of the DrawXtra canvas.
Example: put the canvasWidth of member "canvas"
-- 400

canvasHeight - the height of the DrawXtra canvas.
Example: put the canvasHeight of member "canvas"
-- 300

canvasDepth - (read-only) the color depth of the DrawXtra canvas.
Example: put the canvaDepth of member "canvas"
-- 16

canvasFont - the font used when drawing text.
Example: set the canvasFont of member "canvas" to "Times"

canvasFontSize - the size of the font used when drawing text.
Example: set the canvasFontSize of member "canvas" to 18

canvasPenSize - the thickness of the line used when drawing.
Example: set the canvasPenSize of member "canvas" to 2

drawingMode - the drawingMode controls the drawing operation that will take place in interactive drawing. Possible values are:
"nothing"
"line"
"framedRectangle"
"filledRectangle"
"framedEllipse"
"filledEllipse"
"framedSquare"
"filledSquare"
"framedCircle"
"filledCircle"
"framedRoundRect"
"filledRoundRect"
"singleArrow"
"doubleArrow"
"fill"
"text"
"freehandLine"
Example: set the drawingMode of member "canvas" to "freehandline"

autoRedraw - enables automatic redrawing of the canvas during algorhitmic drawing. When disabled the user must call the Redraw() function after each drawing operation.
Example: set the autoRedraw of member "canvas" to 1

connectFreehandLines - when enabled DrawXtra will automatically connect the points captured when drawing a freehand line in order to keep up with fast drawing. Works better with smaller pen sizes.
Example: set the connectFreehandLines of member "canvas" to 1

trackingcolor - a packed color used to track user interaction in interactive drawing.
Example: set the trackingcolor of member "canvas" to 65536.

canvasColor - the packed color representing the color of the empty canvas.
Example: set the canvascolor of member "canvas" to 0.

fillColorProtection - enables protection of a packed color during fill operations.
Example: set the fillColorProtection of member "canvas" to 1

protectedColor - a packed color that will be preserved during fill operations.
Example: set the protectedcolor of member "canvas" to 0

trapEvents - must be enabled for the canvas to respond to events that occur over it, including interactive drawing operations.
Example: set the protectedcolor of member "canvas" to 1

arrowHeadAngle - the angle of the arrowhead used when drawing with the "singleArrow" and "doubleArrow" drawing modes.
Example: set the arrowHeadAngle of member "canvas" to 60

arrowHeadLength - the length of the arrowhead used when drawing with the "singleArrow" and "doubleArrow" drawing modes.
Example: set the arrowHeadLength of member "canvas" to 10

roundedRectCornerWidth - the amount of "roundness" applied to the width of the shape when drawing with the "framedRoundRect" and "filledRoundRect" modes.
Example: set the roundedRectCornerWidth of member "canvas" to 20

roundedRectCornerHeight - the amount of "roundness" applied to the height of the shape when drawing with the "framedRoundRect" and "filledRoundRect" modes.
Example: set the roundedRectCornerHeight of member "canvas" to 20
Getting Started Packed Colors Functions Creating Projectors Using the Xtra in Shockwave Known Issues How to Order and Register Licensing and Availability Technical Support