Class List

Class Graphics

The Graphics class contains a set of methods that you can use to create a vector shape.

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructor.
Method Summary
Method Attributes Method Name and Description
 
beginBitmapFill(image, repetition)
Fills a drawing area with a bitmap image.
 
beginFill(fill, alpha)
Specifies an available fill that subsequent calls to other Graphics methods (such as lineTo() or drawCircle()) use when drawing.
 
beginLinearGradientFill(x0, y0, x1, y1, colors, ratios)
Specifies a linear gradient fill that subsequent calls to other Graphics methods (such as lineTo() or drawCircle()) use when drawing.
 
beginRadialGradientFill(x0, y0, r0, x1, y1, r1, colors, ratios)
Specifies a radial gradient fill that subsequent calls to other Graphics methods (such as lineTo() or drawCircle()) use when drawing.
 
Clears all grapchis that were drawn.
 
drawCircle(x, y, radius)
Draws a circle.
 
drawEllipse(x, y, width, height)
Draws a ellipse.
 
drawRect(x, y, width, height)
Draws a rectangle.
 
drawRoundRect(x, y, width, height, cornerSize)
Draws a rounded rectangle.
 
drawRoundRectComplex(x, y, width, height, cornerTL, cornerTR, cornerBR, cornerBL)
Draws a complex rounded rectangle.
 
Applies a fill to the lines and curves that were added.
 
get()
Gets the drawable graphics image.
 
lineStyle(thickness, lineColor, alpha, lineCap, lineJoin, miterLimit)
Specifies a line style that Canvas uses for subsequent calls to other Graphics methods (such as lineTo() or drawCircle()) for the object.
 
setSize(width, height)
Sets the predefined canvas size.
Class Detail
Graphics()
Constructor.
Method Detail
beginBitmapFill(image, repetition)
Fills a drawing area with a bitmap image. The repetition parameter must be one of the following values: repeat, repeat-x, repeat-y, no-repeat.
Parameters:
image
repetition

beginFill(fill, alpha)
Specifies an available fill that subsequent calls to other Graphics methods (such as lineTo() or drawCircle()) use when drawing.
Parameters:
fill
alpha

beginLinearGradientFill(x0, y0, x1, y1, colors, ratios)
Specifies a linear gradient fill that subsequent calls to other Graphics methods (such as lineTo() or drawCircle()) use when drawing.
Parameters:
x0
y0
x1
y1
colors
ratios

beginRadialGradientFill(x0, y0, r0, x1, y1, r1, colors, ratios)
Specifies a radial gradient fill that subsequent calls to other Graphics methods (such as lineTo() or drawCircle()) use when drawing.
Parameters:
x0
y0
r0
x1
y1
r1
colors
ratios

clear()
Clears all grapchis that were drawn.

drawCircle(x, y, radius)
Draws a circle.
Parameters:
x
y
radius

drawEllipse(x, y, width, height)
Draws a ellipse.
Parameters:
x
y
width
height

drawRect(x, y, width, height)
Draws a rectangle.
Parameters:
x
y
width
height

drawRoundRect(x, y, width, height, cornerSize)
Draws a rounded rectangle.
Parameters:
x
y
width
height
cornerSize

drawRoundRectComplex(x, y, width, height, cornerTL, cornerTR, cornerBR, cornerBL)
Draws a complex rounded rectangle.
Parameters:
x
y
width
height
cornerTL
cornerTR
cornerBR
cornerBL

endFill()
Applies a fill to the lines and curves that were added.

get()
Gets the drawable graphics image. Here is a canvas.

lineStyle(thickness, lineColor, alpha, lineCap, lineJoin, miterLimit)
Specifies a line style that Canvas uses for subsequent calls to other Graphics methods (such as lineTo() or drawCircle()) for the object.
Parameters:
thickness
lineColor
alpha
lineCap
lineJoin
miterLimit

setSize(width, height)
Sets the predefined canvas size.
Parameters:
width
height

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 25 2011 15:02:39 GMT+0800 (CST)