Package | com.yworks.canvas.drawing |
Class | public class PointSelectionPaintable |
Inheritance | PointSelectionPaintable Object |
Implements | ISelectionPaintable, IHitTestable |
ISelectionPaintable
implementation
that draws an ellipse centered at a given point in world coordinate space.
Property | Defined By | ||
---|---|---|---|
fill : IFill
The fill to use for the point's ellipse in the view coordinate system. | PointSelectionPaintable | ||
stroke : IStroke
The stroke to use for drawing the point in the view coordinate system. | PointSelectionPaintable |
Method | Defined By | ||
---|---|---|---|
PointSelectionPaintable(point:IPoint)
Creates a selection paintable that indicates a point. | PointSelectionPaintable | ||
installSelectionPaintables(userObject:Object, canvas:CanvasComponent, selectionGroup:ICanvasObjectGroup):Array
Implements the interface and installs an ellipse into the canvas control. | PointSelectionPaintable | ||
isHit(x:Number, y:Number, ctx:ICanvasContext):Boolean
Determines if something has been hit at the given coordinates
in the world coordinate system. | PointSelectionPaintable |
Method | Defined By | ||
---|---|---|---|
getCenterPoint(userObject:Object):IPoint
Factory method that retrieves the center for a given user object. | PointSelectionPaintable |
fill | property |
fill:IFill
The fill to use for the point's ellipse in the view coordinate system.
public function get fill():IFill
public function set fill(value:IFill):void
stroke | property |
stroke:IStroke
The stroke to use for drawing the point in the view coordinate system.
public function get stroke():IStroke
public function set stroke(value:IStroke):void
PointSelectionPaintable | () | Constructor |
public function PointSelectionPaintable(point:IPoint)
Creates a selection paintable that indicates a point.
Parameterspoint:IPoint — The point to use for the center of the painting.
|
getCenterPoint | () | method |
protected function getCenterPoint(userObject:Object):IPoint
Factory method that retrieves the center for a given user object.
This implementation simply returns the value provided to the constructor.
Parameters
userObject:Object |
IPoint — the center for a given user object.
|
installSelectionPaintables | () | method |
public function installSelectionPaintables(userObject:Object, canvas:CanvasComponent, selectionGroup:ICanvasObjectGroup):Array
Implements the interface and installs an ellipse into the canvas control.
This method queries the getCenterPoint
for a suitable point.
Parameters
userObject:Object — The item to create a selection for.
| |
canvas:CanvasComponent — The canvas to add the display object creator for the selection painting to.
| |
selectionGroup:ICanvasObjectGroup — The canvas object group to add the items to.
|
Array — An array of canvas objects this instance has installed into the canvas.
|
See also
isHit | () | method |
public function isHit(x:Number, y:Number, ctx:ICanvasContext):Boolean
Determines if something has been hit at the given coordinates in the world coordinate system.
Parameters
x:Number — the x-coordinate in world coordinate system
| |
y:Number — the y-coordinate in world coordinate system
| |
ctx:ICanvasContext — the context the hit test is performed in
|
Boolean — whether something has been hit
|