graphics.ext.Ellipse Extends goog.graphics.ext.StrokeAndFillElement
Wrapper for a graphics ellipse element.

Inheritance

Constructor

goog.graphics.ext.Ellipse(group)

Parameters

group : goog.graphics.ext.Group
Parent for this element.

Instance Methods

Public Protected Private
redraw()
Redraw the ellipse. Called when the coordinate system is changed.
code »
redraw()
Redraw the rectangle. Called when the coordinate system is changed.
code »
setFill(fill)
Sets the fill for this element.
Arguments:
fill : ?goog.graphics.Fill
The fill object.
code »
setStroke(stroke)
Sets the stroke for this element.
Arguments:
stroke : ?goog.graphics.Stroke
The stroke object.
code »
checkParentDependent() boolean
Overridable function for subclass specific parent dependency.
Returns: boolean  Whether this shape's bounds depends on its parent's.
code »
computeIsParentDependent_(position)
Computes whether the element is still parent dependent.
Arguments:
position : goog.graphics.ext.Element.Position_
The recently changed position object.
code »
disposeInternal()
No description.
code »
getBottom() number
No description.
Returns: number  The bottom coordinate of the element, in units of the parent's coordinate system.
code »
getCenter() number
No description.
Returns: number  The center coordinate of the element, in units of the parent's coordinate system.
code »
No description.
Returns: goog.graphics.ext.Element | goog.graphics.ext.Graphics  The graphics surface the element is a part of.
code »
getGraphicsImplementation() goog.graphics.AbstractGraphics
Returns the graphics implementation.
Returns: goog.graphics.AbstractGraphics  The underlying graphics implementation drawing this element's wrapper.
code »
getHeight() number
No description.
Returns: number  The height of the element, in units of the parent's coordinate system.
code »
getLeft() number
No description.
Returns: number  The distance from the left edge of this element to the left edge of its parent, specified in units of the parent's coordinate system.
code »
getMaxX() number
No description.
Returns: number  An estimate of the maximum x extent this element would have in a parent of no width.
code »
getMaxY() number
No description.
Returns: number  An estimate of the maximum y extent this element would have in a parent of no height.
code »
getMiddle() number
No description.
Returns: number  The middle coordinate of the element, in units of the parent's coordinate system.
code »
getMinHeight() number
No description.
Returns: number  The minimum height of the element, in units of the parent's coordinate system.
code »
getMinWidth() number
No description.
Returns: number  The minimum width of the element, in units of the parent's coordinate system.
code »
getParent() goog.graphics.ext.Group | undefined
No description.
Returns: goog.graphics.ext.Group | undefined  The parent of this element.
code »
getPixelScaleX() number
No description.
Returns: number  Returns the number of pixels per unit in the x direction.
code »
getPixelScaleY() number
No description.
Returns: number  Returns the number of pixels per unit in the y direction.
code »
getRight() number
No description.
Returns: number  The right coordinate of the element, in units of the parent's coordinate system.
code »
getRotation() number
No description.
Returns: number  The angle of rotation of this element, in degrees.
code »
getTop() number
No description.
Returns: number  The distance from the top edge of this element to the top edge of its parent, specified in units of the parent's coordinate system.
code »
getWidth() number
No description.
Returns: number  The width of the element, in units of the parent's coordinate system.
code »
getWrapper() goog.graphics.Element
No description.
Returns: goog.graphics.Element  The underlying thin wrapper.
code »
isParentDependent() boolean
Returns whether this element's bounds depend on its parents. This function should be treated as if it has package scope.
Returns: boolean  Whether this element's bounds depend on its parents.
code »
isPendingTransform() boolean
No description.
Returns: boolean  Whether this element has pending transforms.
code »
parentTransform()
Called by the parent when the parent has transformed. Should be treated as package scope.
code »
redraw()
Overridable function for subclass specific reset.
code »
reset()
Reset the element. This is called when the element changes size, or when the coordinate system changes in a way that would affect pixel based rendering
code »
setBottom(bottomopt_chain)
Sets the bottom coordinate of the element. Overwrites any previous value of top, middle, or bottom for this element.
Arguments:
bottom : string | number
The bottom coordinate.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
setBounds(lefttopwidthheightopt_chain)
Shortcut for setting the left, top, width, and height.
Arguments:
left : string | number
The left coordinate.
top : string | number
The top coordinate.
width : string | number
The new width value.
height : string | number
The new height value.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
setCenter(centeropt_chain)
Sets the center coordinate of the element. Overwrites any previous value of left, center, or right for this element.
Arguments:
center : string | number
The center coordinate.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
setHeight(heightopt_chain)
Sets the height of the element.
Arguments:
height : string | number
The new height value.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
setLeft(leftopt_chain)
Sets the left coordinate of the element. Overwrites any previous value of left, center, or right for this element.
Arguments:
left : string | number
The left coordinate.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
setMiddle(middleopt_chain)
Sets the middle coordinate of the element. Overwrites any previous value of top, middle, or bottom for this element
Arguments:
middle : string | number
The middle coordinate.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
setMinHeight(minHeight)
Sets the minimum height of the element.
Arguments:
minHeight : string | number
The minimum height of the element.
code »
setMinSize_(positionminSize)
Sets the minimum width/height of the element.
Arguments:
position : goog.graphics.ext.Element.Position_
The position object to set the value on.
minSize : string | number
The minimum width/height of the element.
code »
setMinWidth(minWidth)
Sets the minimum width of the element.
Arguments:
minWidth : string | number
The minimum width of the element.
code »
setPosition(lefttopopt_chain)
Shortcut for setting the left and top position.
Arguments:
left : string | number
The left coordinate.
top : string | number
The top coordinate.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
setPosition_(positionvaluetypeopt_chain)
Internal convenience method for setting position - either as a left/top, center/middle, or right/bottom value. Only one should be specified.
Arguments:
position : goog.graphics.ext.Element.Position_
The position object to set the value on.
value : number | string
The value of the coordinate.
type : goog.graphics.ext.Element.PositionType_
The type of the coordinate.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
setRight(rightopt_chain)
Sets the right coordinate of the element. Overwrites any previous value of left, center, or right for this element.
Arguments:
right : string | number
The right coordinate.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
setRotation(angle)
Set the rotation of this element.
Arguments:
angle : number
The angle of rotation, in degrees.
code »
setSize(widthheightopt_chain)
Shortcut for setting the width and height.
Arguments:
width : string | number
The new width value.
height : string | number
The new height value.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
setSize_(positionsizeopt_chain)
Sets the width/height of the element.
Arguments:
position : goog.graphics.ext.Element.Position_
The position object to set the value on.
size : string | number
The new width/height value.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
setTop(topopt_chain)
Sets the top coordinate of the element. Overwrites any previous value of top, middle, or bottom for this element.
Arguments:
top : string | number
The top coordinate.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
setWidth(widthopt_chain)
Sets the width of the element.
Arguments:
width : string | number
The new width value.
opt_chain : boolean=
Optional flag to specify this function is part of a chain of calls and therefore transformations should be set as pending but not yet performed.
code »
transform()
Performs a pending transform.
code »
addEventListener(typeopt_captureopt_handlerScope)
Use #listen instead, when possible. Otherwise, use goog.events.listen if you are passing Object (instead of Function) as handler. Adds an event listener to the event target. The same handler can only be added once per the type. Even if you add the same handler multiple times using the same type then it will only be called once when the event is dispatched.
Arguments:
type : string
The type of the event to listen for.
: ?function():? | ?{handleEvent:function():?
No description.
opt_capture : boolean=
In DOM-compliant browsers, this determines whether the listener is fired during the capture or bubble phase of the event.
opt_handlerScope : Object=
Object in whose scope to call the listener.
code »
assertInitialized_()
Asserts that the event target instance is initialized properly.
code »
dispatchEvent()
No description.
code »
disposeInternal()
Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners.
code »
fireListeners()
No description.
code »
getListener()
No description.
code »
getListeners()
No description.
code »
getParentEventTarget() goog.events.EventTarget
Returns the parent of this event target to use for bubbling.
Returns: goog.events.EventTarget  The parent EventTarget or null if there is no parent.
code »
hasListener()
No description.
code »
listen()
No description.
code »
listenOnce()
No description.
code »
removeAllListeners()
No description.
code »
removeEventListener(typeopt_captureopt_handlerScope)
Use #unlisten instead, when possible. Otherwise, use goog.events.unlisten if you are passing Object (instead of Function) as handler. Removes an event listener from the event target. The handler must be the same object as the one added. If the handler has not been added then nothing is done.
Arguments:
type : string
The type of the event to listen for.
: ?function():? | ?{handleEvent:function():?
No description.
opt_capture : boolean=
In DOM-compliant browsers, this determines whether the listener is fired during the capture or bubble phase of the event.
opt_handlerScope : Object=
Object in whose scope to call the listener.
code »
setParentEventTarget(parent)
Sets the parent of this event target to use for capture/bubble mechanism.
Arguments:
parent : goog.events.EventTarget
Parent listenable (null if none).
code »
setTargetForTesting(target)
Sets the target to be used for event.target when firing event. Mainly used for testing. For example, see goog.testing.events.mixinListenable.
Arguments:
target : !Object
The target.
code »
unlisten()
No description.
code »
unlistenByKey()
No description.
code »
addOnDisposeCallback(callbackopt_scope)
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.
Arguments:
callback : function(this:T):?
The callback function.
opt_scope : T=
An optional scope to call the callback in.
code »
dispose() void
Disposes of the object. If the object hasn't already been disposed of, calls #disposeInternal. Classes that extend goog.Disposable should override #disposeInternal in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
Returns: void  Nothing.
code »
disposeInternal()
Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend goog.Disposable should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' disposeInternal method. Everywhere else the public dispose method must be used. For example:
  mypackage.MyClass = function() {
    mypackage.MyClass.base(this, 'constructor');
    // Constructor logic specific to MyClass.
    ...
  };
  goog.inherits(mypackage.MyClass, goog.Disposable);

  mypackage.MyClass.prototype.disposeInternal = function() {
    // Dispose logic specific to MyClass.
    ...
    // Call superclass's disposeInternal at the end of the subclass's, like
    // in C++, to avoid hard-to-catch issues.
    mypackage.MyClass.base(this, 'disposeInternal');
  };
code »
getDisposed() boolean
Use #isDisposed instead. No description.
Returns: boolean  Whether the object has been disposed of.
code »
isDisposed() boolean
No description.
Returns: boolean  Whether the object has been disposed of.
code »
registerDisposable(disposable)
Associates a disposable object with this object so that they will be disposed together.
Arguments:
disposable : goog.disposable.IDisposable
that will be disposed when this object is disposed.
code »

Instance Properties

constructor :
No description.
Code »
constructor :
No description.
Code »
constructor :
No description.
Code »
The graphics object that contains this element.
Code »
needsTransform_ :
Whether the element has pending transformations.
Code »
parentDependent_ :
Whether or not computation of this element's position or size depends on its parent's size.
Code »
The group or surface containing this element.
Code »
rotation_ :
The current angle of rotation, expressed in degrees.
Code »
The goog.graphics wrapper this class wraps.
Code »
Object representing the x position and size of the element.
Code »
Object representing the y position and size of the element.
Code »
actualEventTarget_ : goog.events.EventTarget
The object to use for event.target. Useful when mixing in an EventTarget to another object.
Code »
constructor :
No description.
Code »
eventTargetListeners_ : goog.events.ListenerMap
Maps of event type to an array of listeners.
Code »
parentEventTarget_ : goog.events.EventTarget
Parent event target, used during event bubbling. TODO(user): Change this to goog.events.Listenable. This currently breaks people who expect getParentEventTarget to return goog.events.EventTarget.
Code »
creationStack :
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
Code »
disposed_ :
Whether the object has been disposed of.
Code »
onDisposeCallbacks_ :
Callbacks to invoke when this object is disposed.
Code »

Static Properties

goog.graphics.ext.Ellipse.superClass_ :
No description.
Code »

Package graphics.ext

Package Reference