mx.geom

# RoundedRectangle - AS3 Flex

Package | mx.geom
Class | public class RoundedRectangle
Inheritance | RoundedRectangle Rectangle Object

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

RoundedRectangle represents a Rectangle with curved corners

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | bottom : Number The sum of the y and height properties. | Rectangle
|  | bottomRight : Point The location of the Rectangle object's bottom-right corner, determined by the values of the right and bottom properties. | Rectangle
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | cornerRadius : Number = 0 The radius of each corner (in pixels). | RoundedRectangle
|  | height : Number The height of the rectangle, in pixels. | Rectangle
|  | left : Number The x coordinate of the top-left corner of the rectangle. | Rectangle
|  | right : Number The sum of the x and width properties. | Rectangle
|  | size : Point The size of the Rectangle object, expressed as a Point object with the values of the width and height properties. | Rectangle
|  | top : Number The y coordinate of the top-left corner of the rectangle. | Rectangle
|  | topLeft : Point The location of the Rectangle object's top-left corner, determined by the x and y coordinates of the point. | Rectangle
|  | width : Number The width of the rectangle, in pixels. | Rectangle
|  | x : Number The x coordinate of the top-left corner of the rectangle. | Rectangle
|  | y : Number The y coordinate of the top-left corner of the rectangle. | Rectangle

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | RoundedRectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, cornerRadius:Number = 0) Constructor. | RoundedRectangle
|  | clone():Rectangle Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object. | Rectangle
|  | contains(x:Number, y:Number):Boolean Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. | Rectangle
|  | containsPoint(point:Point):Boolean Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. | Rectangle
|  | containsRect(rect:Rectangle):Boolean Determines whether the Rectangle object specified by the rect parameter is contained within this Rectangle object. | Rectangle
|  | copyFrom(sourceRect:Rectangle):void Copies all of rectangle data from the source Rectangle object into the calling Rectangle object. | Rectangle
|  | equals(toCompare:Rectangle):Boolean Determines whether the object specified in the toCompare parameter is equal to this Rectangle object. | Rectangle
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | inflate(dx:Number, dy:Number):void Increases the size of the Rectangle object by the specified amounts, in pixels. | Rectangle
|  | inflatePoint(point:Point):void Increases the size of the Rectangle object. | Rectangle
|  | intersection(toIntersect:Rectangle):Rectangle If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. | Rectangle
|  | intersects(toIntersect:Rectangle):Boolean Determines whether the object specified in the toIntersect parameter intersects with this Rectangle object. | Rectangle
|  | isEmpty():Boolean Determines whether or not this Rectangle object is empty. | Rectangle
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | offset(dx:Number, dy:Number):void Adjusts the location of the Rectangle object, as determined by its top-left corner, by the specified amounts. | Rectangle
|  | offsetPoint(point:Point):void Adjusts the location of the Rectangle object using a Point object as a parameter. | Rectangle
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setEmpty():void Sets all of the Rectangle object's properties to 0. | Rectangle
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | setTo(xa:Number, ya:Number, widtha:Number, heighta:Number):void Sets the members of Rectangle to the specified values | Rectangle
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Builds and returns a string that lists the horizontal and vertical positions and the width and height of the Rectangle object. | Rectangle
|  | union(toUnion:Rectangle):Rectangle Adds two rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two rectangles. | Rectangle
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

### cornerRadius

property

`public var cornerRadius:Number = 0`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The radius of each corner (in pixels).

The default value is `0.`

Constructor Detail

### RoundedRectangle

()
Constructor

`public function RoundedRectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, cornerRadius:Number = 0)`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Constructor.

Parameters

| `x:Number` (default = `0`)`` — The x coordinate of the top-left corner of the rectangle.
| `y:Number` (default = `0`)`` — The y coordinate of the top-left corner of the rectangle.
| `width:Number` (default = `0`)`` — The width of the rectangle, in pixels.
| `height:Number` (default = `0`)`` — The height of the rectangle, in pixels.
| `cornerRadius:Number` (default = `0`)`` — The radius of each corner, in pixels.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00