Packageorg.apache.flex.svg
Classpublic class CompoundGraphic
InheritanceCompoundGraphic Inheritance GraphicShape Inheritance UIBase Inheritance HTMLElementWrapper Inheritance flash.display.Sprite
Implements ICompoundGraphic
Subclasses GraphicsItemRenderer, SVGChartAxisGroup, SVGChartDataGroup

CompoundGraphic is a surface on which you can draw various graphic elements such as Rect, Circle, Ellipse, Path etc. Use this class if you want to draw multiple graphic shapes on a single container.



Public Properties
 PropertyDefined By
 Inherited$height : Number
[read-only] Retrieve the low-level bounding box height.
UIBase
 Inherited$width : Number
[read-only] Retrieve the low-level bounding box width.
UIBase
 Inheritedbeads : Array
The array property that is used to add additional beads to an MXML tag.
UIBase
 InheritedclassName : String
The classname.
UIBase
 Inheritedelement : IFlexJSElement
[read-only] Each IUIBase has an element that is actually added to the platform's display list DOM.
UIBase
 InheritedexplicitHeight : Number
The explicitly set width (as opposed to measured width or percentage width).
UIBase
 InheritedexplicitWidth : Number
The explicitly set width (as opposed to measured width or percentage width).
UIBase
 Inheritedfill : IFill
A solid color fill.
GraphicShape
 Inheritedheight : Number
[override] The height of the component.
UIBase
 Inheritedid : String
An id property for MXML documents.
UIBase
 InheritedmeasurementBead : IMeasurementBead
[read-only] A measurement bead, if one exists.
UIBase
 Inheritedmodel : Object
An IBeadModel that serves as the data model for the component.
UIBase
 InheritednumElements : int
[read-only] The number of elements in the parent.
UIBase
 InheritedpercentHeight : Number
The requested percentage height this component should have in the parent container.
UIBase
 InheritedpercentWidth : Number
The requested percentage width this component should have in the parent container.
UIBase
 Inheritedstroke : IStroke
A solid color fill.
GraphicShape
 Inheritedstyle : Object
The object that contains "styles" and other associated name-value pairs.
UIBase
  textFill : IFill
The color of the text.
CompoundGraphic
  textStroke : IStroke
The stroke color of the text.
CompoundGraphic
 InheritedtopMostEventDispatcher : IEventDispatcher
[read-only] The top most event dispatcher.
UIBase
 InheritedtypeNames : String
A list of type names.
UIBase
 Inheritedview : IBeadView
An IBeadView that serves as the view for the component.
UIBase
 Inheritedwidth : Number
[override] The width of the component.
UIBase
Public Methods
 MethodDefined By
 Inherited
addBead(bead:IBead):void
[override] Add a bead to the strand.
UIBase
 Inherited
[override]
GraphicShape
 Inherited
addElement(c:Object, dispatchEvent:Boolean = true):void
Add a component to the parent.
UIBase
 Inherited
addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
Add a component to the parent.
UIBase
  
clear():void
Clears all of the drawn path data.
CompoundGraphic
  
drawCircle(x:Number, y:Number, radius:Number):void
Draw the circle.
CompoundGraphic
  
drawEllipse(x:Number, y:Number, width:Number, height:Number):void
Draw the ellipse.
CompoundGraphic
  
drawLine():void
CompoundGraphic
  
Draw the path.
CompoundGraphic
  
CompoundGraphic
  
drawRect(x:Number, y:Number, width:Number, height:Number):void
Draw the rectangle.
CompoundGraphic
  
drawRoundRect(x:Number, y:Number, width:Number, height:Number, radiusX:Number, radiusY:Number):void
Draws a rounded rectangle.
CompoundGraphic
  
drawRoundRectComplex(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.
CompoundGraphic
  
drawRoundRectComplex2(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
Draws a rounded rectangle using the size of individual x and y radii to draw the rounded corners.
CompoundGraphic
  
drawStringPath(data:String):void
Draw the path.
CompoundGraphic
  
drawText(value:String, x:Number, y:Number):Object
Draw a string of characters.
CompoundGraphic
 Inherited
getBeadByType(classOrInterface:Class):IBead
Find a bead on the strand.
UIBase
 Inherited
getElementAt(index:int):Object
Get a component from the parent.
UIBase
 Inherited
getElementIndex(c:Object):int
Gets the index of this subcomponent.
UIBase
 Inherited
UIBase
 Inherited
UIBase
  
Removes all of the drawn elements of the container.
CompoundGraphic
 Inherited
Remove a bead from the strand.
UIBase
 Inherited
removeElement(c:Object, dispatchEvent:Boolean = true):void
Remove a component from the parent.
UIBase
 Inherited
setHeight(value:Number, noEvent:Boolean = false):void
UIBase
 Inherited
setWidth(value:Number, noEvent:Boolean = false):void
UIBase
 Inherited
setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void
UIBase
 Inherited
setX(value:Number):void
UIBase
 Inherited
setY(value:Number):void
UIBase
Protected Methods
 MethodDefined By
 Inherited
GraphicShape
 Inherited
beginFill(targetBounds:Rectangle, targetOrigin:Point):void
GraphicShape
 Inherited
draw():void
This is where the drawing methods get called from
GraphicShape
 Inherited
endFill():void
GraphicShape
 Inherited
Rebroadcast an event from a sub component from the component.
UIBase
Events
 Event Summary Defined By
 InheritedSet a different class for click events so that there aren't dependencies on the flash classes on the JS side.UIBase
 InheritedSet a different class for mouseDown events so that there aren't dependencies on the flash classes on the JS side.UIBase
 InheritedSet a different class for mouseMove events so that there aren't dependencies on the flash classes on the JS side.UIBase
 InheritedSet a different class for mouseOut events so that there aren't dependencies on the flash classes on the JS side.UIBase
 InheritedSet a different class for mouseOver events so that there aren't dependencies on the flash classes on the JS side.UIBase
 InheritedSet a different class for mouseUp events so that there aren't dependencies on the flash classes on the JS side.UIBase
 InheritedSet a different class for rollOut events so that there aren't dependencies on the flash classes on the JS side.UIBase
 InheritedSet a different class for rollOver events so that there aren't dependencies on the flash classes on the JS side.UIBase
Property Detail
textFillproperty
textFill:IFill

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 9, AIR 1.1

The color of the text.


Implementation
    public function get textFill():IFill
    public function set textFill(value:IFill):void
textStrokeproperty 
textStroke:IStroke

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 9, AIR 1.1

The stroke color of the text.


Implementation
    public function get textStroke():IStroke
    public function set textStroke(value:IStroke):void
Method Detail
clear()method
public function clear():void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.7.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Clears all of the drawn path data.

drawCircle()method 
public function drawCircle(x:Number, y:Number, radius:Number):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Draw the circle.

Parameters

x:Number — The x location of the center of the circle
 
y:Number — The y location of the center of the circle.
 
radius:Number — The radius of the circle.

drawEllipse()method 
public function drawEllipse(x:Number, y:Number, width:Number, height:Number):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0.3
Runtime Versions : Flash Player 10.2, AIR 2.6

Draw the ellipse.

Parameters

x:Number — The x position of the top-left corner of the bounding box of the ellipse.
 
y:Number — The y position of the top-left corner of the bounding box of the ellipse.
 
width:Number — The width of the ellipse.
 
height:Number — The height of the ellipse.

drawLine()method 
public function drawLine():void

drawPathCommands()method 
public function drawPathCommands(data:PathBuilder):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Draw the path.

Parameters

data:PathBuilder — A PathBuilder object containing a vector of drawing commands.

drawPolygon()method 
public function drawPolygon():void

drawRect()method 
public function drawRect(x:Number, y:Number, width:Number, height:Number):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0.3
Runtime Versions : Flash Player 10.2, AIR 2.6

Draw the rectangle.

Parameters

x:Number — The x position of the top-left corner of the rectangle.
 
y:Number — The y position of the top-left corner.
 
width:Number — The width of the rectangle.
 
height:Number — The height of the rectangle.

drawRoundRect()method 
public function drawRoundRect(x:Number, y:Number, width:Number, height:Number, radiusX:Number, radiusY:Number):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0.3
Runtime Versions : Flash Player 10.2, AIR 2.6

Draws a rounded rectangle. Note: The radius values are different than the Flash API of the same name. Flash uses diameter instead of radius.

Parameters

x:Number — The x position of the top-left corner of the rectangle.
 
y:Number — The y position of the top-left corner.
 
width:Number — The width of the rectangle.
 
height:Number — The height of the rectangle.
 
radiusX:Number — The horizontal radius of the rounded corners (in pixels).
 
radiusY:Number (default = NaN) — The vertical radius of the rounded corners (in pixels). Optional; if no value is specified, the default value matches that provided for the radiusX parameter.

drawRoundRectComplex()method 
public function drawRoundRectComplex(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

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

drawRoundRectComplex2()method 
public function drawRoundRectComplex2(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

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

drawStringPath()method 
public function drawStringPath(data:String):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Draw the path.

Parameters

data:String — A string containing a compact represention of the path segments. The value is a space-delimited string describing each path segment. Each segment entry has a single character which denotes the segment type and two or more segment parameters. If the segment command is upper-case, the parameters are absolute values. If the segment command is lower-case, the parameters are relative values.

drawText()method 
public function drawText(value:String, x:Number, y:Number):Object

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Draw a string of characters.

Parameters

value:String — The string to draw.
 
x:Number — The x location of the center of the circle
 
y:Number — The y location of the center of the circle.

Returns
Object
removeAllElements()method 
public function removeAllElements():void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0.3
Runtime Versions : Flash Player 10.2, AIR 2.6

Removes all of the drawn elements of the container.