Adobe Flex 2 Language Reference - collected by Jimbob | Back to MY RESOURCES


Packagemx.utils
Classpublic class GraphicsUtil
InheritanceGraphicsUtil Inheritance Object

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
 Inherited
setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void
Sets the availability of a dynamic property for loop operations.
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

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.





collected by Jimbob 2007.05