Adobe® Flex® 4 Language Reference
Show Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.utils 
GraphicsUtil 
Packagemx.utils
Classpublic class GraphicsUtil
InheritanceGraphicsUtil Inheritance Object

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The Graphics class is an all-static class with utility methods related to the Graphics class. You do not create instances of GraphicsUtil; instead you simply call methods such as the GraphicsUtil.drawRoundRectComplex() method.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
  
drawRoundRectComplex(graphics:Graphics, x:Number, y:Number, width:Number, height:Number, topLeftRadius:Number, topRightRadius:Number, bottomLeftRadius:Number, bottomRightRadius:Number):void
[static] Draws a rounded rectangle using the size of a radius to draw the rounded corners.
GraphicsUtil
  
drawRoundRectComplex2(graphics:Graphics, x:Number, y:Number, width:Number, height:Number, radiusX:Number, radiusY:Number, topLeftRadiusX:Number, topLeftRadiusY:Number, topRightRadiusX:Number, topRightRadiusY:Number, bottomLeftRadiusX:Number, bottomLeftRadiusY:Number, bottomRightRadiusX:Number, bottomRightRadiusY:Number):void
[static] Draws a rounded rectangle using the size of individual x and y radii to draw the rounded corners.
GraphicsUtil
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Method Detail

drawRoundRectComplex

()method
public static function drawRoundRectComplex(graphics:Graphics, x:Number, y:Number, width:Number, height:Number, topLeftRadius:Number, topRightRadius:Number, bottomLeftRadius:Number, bottomRightRadius:Number):void

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Draws a rounded rectangle using the size of a radius to draw the rounded corners. You must set the line style, fill, or both on the Graphics object before you call the drawRoundRectComplex() method by calling the linestyle(), lineGradientStyle(), beginFill(), beginGradientFill(), or beginBitmapFill() method.

Parameters

graphics:Graphics — The Graphics object that draws the rounded rectangle.
 
x:Number — The horizontal position relative to the registration point of the parent display object, in pixels.
 
y:Number — The vertical position relative to the registration point of the parent display object, in pixels.
 
width:Number — The width of the round rectangle, in pixels.
 
height:Number — The height of the round rectangle, in pixels.
 
topLeftRadius:Number — The radius of the upper-left corner, in pixels.
 
topRightRadius:Number — The radius of the upper-right corner, in pixels.
 
bottomLeftRadius:Number — The radius of the bottom-left corner, in pixels.
 
bottomRightRadius:Number — The radius of the bottom-right corner, in pixels.

drawRoundRectComplex2

()method 
public static function drawRoundRectComplex2(graphics:Graphics, x:Number, y:Number, width:Number, height:Number, radiusX:Number, radiusY:Number, topLeftRadiusX:Number, topLeftRadiusY:Number, topRightRadiusX:Number, topRightRadiusY:Number, bottomLeftRadiusX:Number, bottomLeftRadiusY:Number, bottomRightRadiusX:Number, bottomRightRadiusY:Number):void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Draws a rounded rectangle using the size of individual x and y radii to draw the rounded corners. You must set the line style, fill, or both on the Graphics object before you call the drawRoundRectComplex2() method by calling the linestyle(), lineGradientStyle(), beginFill(), beginGradientFill(), or beginBitmapFill() method.

Parameters

graphics:Graphics — The Graphics object that draws the rounded rectangle.
 
x:Number — The horizontal position relative to the registration point of the parent display object, in pixels.
 
y:Number — The vertical position relative to the registration point of the parent display object, in pixels.
 
width:Number — The width of the round rectangle, in pixels.
 
height:Number — The height of the round rectangle, in pixels.
 
radiusX:Number — The default radiusX to use, if corner-specific values are not specified. This value must be specified.
 
radiusY:Number — The default radiusY to use, if corner-specific values are not specified. If 0, the value of radiusX is used.
 
topLeftRadiusX:Number — The x radius of the upper-left corner, in pixels. If NaN, the value of radiusX is used.
 
topLeftRadiusY:Number — The y radius of the upper-left corner, in pixels. If NaN, the value of topLeftRadiusX is used.
 
topRightRadiusX:Number — The x radius of the upper-right corner, in pixels. If NaN, the value of radiusX is used.
 
topRightRadiusY:Number — The y radius of the upper-right corner, in pixels. If NaN, the value of topRightRadiusX is used.
 
bottomLeftRadiusX:Number — The x radius of the bottom-left corner, in pixels. If NaN, the value of radiusX is used.
 
bottomLeftRadiusY:Number — The y radius of the bottom-left corner, in pixels. If NaN, the value of bottomLeftRadiusX is used.
 
bottomRightRadiusX:Number — The x radius of the bottom-right corner, in pixels. If NaN, the value of radiusX is used.
 
bottomRightRadiusY:Number — The y radius of the bottom-right corner, in pixels. If NaN, the value of bottomRightRadiusX is used.