Package | spark.primitives |
Class | public class Ellipse |
Inheritance | Ellipse FilledElement StrokedElement GraphicElement EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Graphics.drawEllipse()
method.
See also
Method | Defined By | ||
---|---|---|---|
Ellipse()
Constructor. | Ellipse | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | ||
Returns true if this IGraphicElement is compatible and can
share display objects with the next IGraphicElement
in the sequence. | GraphicElement | ||
Returns true if this IGraphicElement is compatible and can
share display objects with the previous IGraphicElement
in the sequence. | GraphicElement | ||
Creates a new DisplayObject where this IGraphicElement
is drawn. | GraphicElement | ||
Dispatches an event into the event flow. | EventDispatcher | ||
[override]
Returns the x coordinate of the element's bounds at the specified element size. | Ellipse | ||
[override]
Returns the y coordinate of the element's bounds at the specified element size. | Ellipse | ||
Returns the element's layout height. | GraphicElement | ||
Returns the element's layout width. | GraphicElement | ||
Returns the x coordinate that the element uses to draw on screen. | GraphicElement | ||
Returns the y coordinate that the element uses to draw on screen. | GraphicElement | ||
Returns the transform matrix that is used to calculate the component's
layout relative to its siblings. | GraphicElement | ||
Returns the layout transform Matrix3D for this element. | GraphicElement | ||
Returns the element's maximum height. | GraphicElement | ||
Returns the element's maximum width. | GraphicElement | ||
Returns the element's minimum height. | GraphicElement | ||
Returns the element's minimum width. | GraphicElement | ||
Returns the element's preferred height. | GraphicElement | ||
Returns the element's preferred width. | GraphicElement | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Called automatically by the MXML compiler when the GraphicElement
is created using an MXML tag. | GraphicElement | ||
Calling this method results in a call to the elements's
validateDisplayList() method
before the display list is rendered. | GraphicElement | ||
An element must call this method when its layoutDirection changes or
when its parent's layoutDirection changes. | GraphicElement | ||
Calling this method results in a call to the elements's
validateProperties() method
before the display list is rendered. | GraphicElement | ||
Calling this method results in a call to the elements's
validateSize() method
before the display list is rendered. | GraphicElement | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Converts the point object from the object's (local) coordinates
to the Stage (global) coordinates. | GraphicElement | ||
Called by Group when an IGraphicElement
is added to or removed from a Group. | GraphicElement | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
setLayoutBoundsPosition(newBoundsX:Number, newBoundsY:Number, postLayoutTransform:Boolean = true):void
Sets the coordinates that the element uses to draw on screen. | GraphicElement | ||
Sets the layout size of the element. | GraphicElement | ||
Sets the transform Matrix that is used to calculate the component's layout
size and position relative to its siblings. | GraphicElement | ||
Sets the transform Matrix3D that is used to calculate the component's layout
size and position relative to its siblings. | GraphicElement | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Determines whether this element can draw itself to the
sharedDisplayObject of the sequence. | GraphicElement | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
transformAround(transformCenter:Vector3D, scale:Vector3D = null, rotation:Vector3D = null, translation:Vector3D = null, postLayoutScale:Vector3D = null, postLayoutRotation:Vector3D = null, postLayoutTranslation:Vector3D = null, invalidateLayout:Boolean = true):void
A utility method to update the rotation, scale, and translation of the
transform while keeping a particular point, specified in the component's
own coordinate space, fixed in the parent's coordinate space. | GraphicElement | ||
A utility method to transform a point specified in the local
coordinates of this object to its location in the object's parent's
coordinates. | GraphicElement | ||
Called by the parent Group to redraw this element
in its displayObject property. | GraphicElement | ||
Validates and updates the properties and layout of this object
by immediately calling validateProperties(),
validateSize(), and validateDisplayList(),
if necessary. | GraphicElement | ||
Used by layout logic to validate the properties of a component
by calling the commitProperties() method. | GraphicElement | ||
Called by the parent Group to validate the size of
this element. | GraphicElement | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Method | Defined By | ||
---|---|---|---|
[override]
Set up the drawing for this element. | FilledElement | ||
Determines if the call to the measure() method can be skipped. | GraphicElement | ||
Processes the properties set on the element. | GraphicElement | ||
[override]
Draw the element. | Ellipse | ||
[override]
Finalize drawing for this element. | FilledElement | ||
Returns the amount of pixels occupied by the stroke on each side
of the element's bounds. | GraphicElement | ||
Utility method that notifies the host that this element has changed and needs
its layer to be updated. | GraphicElement | ||
Helper method to invalidate parent size and display list if
this object affects its layout (includeInLayout is true). | GraphicElement | ||
Calculates the default size of the element. | GraphicElement | ||
Used for the implementation of the ILayoutElement interface,
returns the explicit of measured height pre-transform. | GraphicElement | ||
Used for the implementation of the ILayoutElement interface,
returns the explicit of measured width pre-transform. | GraphicElement | ||
Transform the element's size. | GraphicElement | ||
Transform the element's size. | GraphicElement | ||
[override]
Draws the element and/or sizes and positions its content. | StrokedElement |
Ellipse | () | Constructor |
public function Ellipse()
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Constructor.
draw | () | method |
override protected function draw(g:Graphics):void
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Draw the element. This is the second of three steps taken during the drawing
process. Override this method to implement your drawing. The stroke
(and fill, if applicable) have been set in the beginDraw()
method.
Your override should only contain calls to drawing methods such as
moveTo()
, curveTo()
, and drawRect()
.
Parameters
g:Graphics — The graphic element to draw.
|
getBoundsXAtSize | () | method |
override public function getBoundsXAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the x coordinate of the element's bounds at the specified element size.
This method is typically used by layouts during a call to the
measure()
method to predict what
the element position will be, if the element is resized to particular dimensions.
Parameters
width:Number — The element's bounds width, or NaN to use the preferred width.
| |
height:Number — The element's bounds height, or NaN to use the preferred height.
| |
postLayoutTransform:Boolean (default = true ) — When postLayoutTransform is true the method returns
x coordinate of the element's bounding box top-left corner.
Bounding box is in element's parent coordinate space and is calculated
from the specified bounds size, layout position and layout transform matrix.
|
Number |
getBoundsYAtSize | () | method |
override public function getBoundsYAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the y coordinate of the element's bounds at the specified element size.
This method is typically used by layouts during a call to
the measure()
to predict what
the element position will be, if the element is resized to particular dimensions.
Parameters
width:Number — The element's bounds width, or NaN to use the preferred width.
| |
height:Number — The element's bounds height, or NaN to use the preferred height.
| |
postLayoutTransform:Boolean (default = true ) — When postLayoutTransform is true the method returns
y coordinate of the element's bounding box top-left corner.
Bounding box is in element's parent coordinate space and is calculated
from the specified bounds size, layout position and layout transform matrix.
|
Number |
<?xml version="1.0" encoding="utf-8"?> <!-- EllipseExample.mxml --> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"> <s:Panel title="Ellipse Graphic Example" width="75%" height="75%" horizontalCenter="0" verticalCenter="0"> <s:Graphic horizontalCenter="0" verticalCenter="0"> <s:Ellipse height="100" width="250"> <s:stroke> <s:SolidColorStroke color="0x000000" weight="2"/> </s:stroke> <s:fill> <s:RadialGradient> <s:entries> <s:GradientEntry color="0x0056FF" ratio="0.00" alpha="0.5"/> <s:GradientEntry color="0x00CC99" ratio="0.33" alpha="0.5"/> <s:GradientEntry color="0xECEC21" ratio="0.66" alpha="0.5"/> </s:entries> </s:RadialGradient> </s:fill> </s:Ellipse> </s:Graphic> </s:Panel> </s:Application>
Thu May 20 2010, 02:19 AM -07:00