GraphicsPath
A collection of drawing commands and the coordinate parameters for those commands.
Use a GraphicsPath object with the Graphics.drawGraphicsData() method. Drawing a GraphicsPath object is the equivalent of calling the Graphics.drawPath() method.
The GraphicsPath object also has its own set of methods (curveTo(), lineTo(), moveTo() wideLineTo() and wideMoveTo()) similar to those in the Graphics object for making adjustments to the GraphicsPath.commands and GraphicsPath.data vector arrays.
Can be created with method new:
Lib.Media.Display.GraphicsPath.new(commands, data, winding) |
Creates a new GraphicsPath object. |
commands - (default = nil) - A Vector array of integers representing commands defined by the GraphicsPathCommand object. data - (default = nil) - A Vector array of Numbers where each pair of numbers is treated as a point (an x, y pair). winding - (default = "evenOdd") - Specifies the winding rule using a value defined in the GraphicsPathWinding object. |
Created GraphicsPath object has properties:
commands |
The Vector of drawing commands as integers representing the path. |
data |
The Vector of Numbers containing the parameters used with the drawing commands. |
methods:
curveTo(controlX, controlY, anchorX, anchorY) |
Adds a new "curveTo" command to the commands vector and new coordinates to the data vector. |
controlX - A number that specifies the horizontal position of the control point relative to the registration point of the parent display object. controlY - A number that specifies the vertical position of the control point relative to the registration point of the parent display object. anchorX - A number that specifies the horizontal position of the next anchor point relative to the registration point of the parent display object. anchorY - A number that specifies the vertical position of the next anchor point relative to the registration point of the parent display object. |
lineTo(x, y) |
Adds a new "lineTo" command to the commands vector and new coordinates to the data vector. |
x - The x coordinate of the destination point for the line. y - The y coordinate of the destination point for the line. |
moveTo(x, y) |
Adds a new "moveTo" command to the commands vector and new coordinates to the data vector. |
x - The x coordinate of the destination point. y - The y coordinate of the destination point. |
wideLineTo(x, y) |
Adds a new "wideLineTo" command to the commands vector and new coordinates to the data vector. |
x - The x-coordinate of the destination point for the line. y - The y-coordinate of the destination point for the line. |
wideMoveTo(x, y) |
Adds a new "wideMoveTo" command to the commands vector and new coordinates to the data vector. |
x - The x-coordinate of the destination point. y - The y-coordinate of the destination point. |
Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator