| Package | com.yworks.canvas.drawing |
| Class | public class FixedDistanceSnapResultPaintable |
| Inheritance | FixedDistanceSnapResultPaintable Object |
| Implements | IPaintable |
SnapLine (target line)
that has a fixed distance to a non-moved object (source).
The source line is the line induced by the source to which the target shall keep the fixed distance.
The sourceLineFrom and sourceLineTo resp. targetLineFrom and
targetLineTo positions mark significant segments of the source and target line for the
SnapResult at hand.
The fixed distance can be visualized by a line between distanceIndicatorFrom
and distanceIndicatorTo which is orthogonal to the source and target lines.
This paintable draws a line between sourceLineFrom and sourceLineTo as well as a
double-pointed arrow between distanceIndicatorFrom and distanceIndicatorTo.
The source point is further marked with a cross.
See also
| Property | Defined By | ||
|---|---|---|---|
| _distance : Number | FixedDistanceSnapResultPaintable | ||
| distance : Number
The distance from the source the target has snapped to. | FixedDistanceSnapResultPaintable | ||
| _distanceIndicatorFrom : IPoint | FixedDistanceSnapResultPaintable | ||
| distanceIndicatorFrom : IPoint
The begin of the distance indicator line. | FixedDistanceSnapResultPaintable | ||
| _distanceIndicatorTo : IPoint | FixedDistanceSnapResultPaintable | ||
| distanceIndicatorTo : IPoint
The end of the distance indicator line. | FixedDistanceSnapResultPaintable | ||
| _sourceLineFrom : IPoint | FixedDistanceSnapResultPaintable | ||
| sourceLineFrom : IPoint
The begin of the source line segment. | FixedDistanceSnapResultPaintable | ||
| _sourceLineTo : IPoint | FixedDistanceSnapResultPaintable | ||
| sourceLineTo : IPoint
The end of the source line segment. | FixedDistanceSnapResultPaintable | ||
| _sourcePoint : IPoint | FixedDistanceSnapResultPaintable | ||
| sourcePoint : IPoint
A position in world coordinates representing the source of the SnapLine. | FixedDistanceSnapResultPaintable | ||
| _stroke : IStroke | FixedDistanceSnapResultPaintable | ||
| stroke : IStroke
The stroke used in the paint method. | FixedDistanceSnapResultPaintable | ||
| _targetLineFrom : IPoint | FixedDistanceSnapResultPaintable | ||
| targetLineFrom : IPoint
The begin of the target line segment. | FixedDistanceSnapResultPaintable | ||
| _targetLineTo : IPoint | FixedDistanceSnapResultPaintable | ||
| targetLineTo : IPoint
The end of the target line segment. | FixedDistanceSnapResultPaintable | ||
| _targetPoint : IPoint | FixedDistanceSnapResultPaintable | ||
| targetPoint : IPoint
The location in world coordinates where the target has snapped to the SnapLine. | FixedDistanceSnapResultPaintable | ||
| Method | Defined By | ||
|---|---|---|---|
Draws a line between sourceLineFrom and sourceLineTo as well as a double-pointed arrow
between distanceIndicatorFrom and distanceIndicatorTo. | FixedDistanceSnapResultPaintable | ||
| _distance | property |
public var _distance:Number| _distanceIndicatorFrom | property |
public var _distanceIndicatorFrom:IPoint| _distanceIndicatorTo | property |
public var _distanceIndicatorTo:IPoint| _sourceLineFrom | property |
public var _sourceLineFrom:IPoint| _sourceLineTo | property |
public var _sourceLineTo:IPoint| _sourcePoint | property |
public var _sourcePoint:IPoint| _stroke | property |
public var _stroke:IStroke| _targetLineFrom | property |
public var _targetLineFrom:IPoint| _targetLineTo | property |
public var _targetLineTo:IPoint| _targetPoint | property |
public var _targetPoint:IPoint| distance | property |
distance:NumberThe distance from the source the target has snapped to.
public function get distance():Number public function set distance(value:Number):void| distanceIndicatorFrom | property |
distanceIndicatorFrom:IPointThe begin of the distance indicator line.
public function get distanceIndicatorFrom():IPoint public function set distanceIndicatorFrom(value:IPoint):void| distanceIndicatorTo | property |
distanceIndicatorTo:IPointThe end of the distance indicator line.
public function get distanceIndicatorTo():IPoint public function set distanceIndicatorTo(value:IPoint):void| sourceLineFrom | property |
sourceLineFrom:IPointThe begin of the source line segment.
public function get sourceLineFrom():IPoint public function set sourceLineFrom(value:IPoint):void| sourceLineTo | property |
sourceLineTo:IPointThe end of the source line segment.
public function get sourceLineTo():IPoint public function set sourceLineTo(value:IPoint):void| sourcePoint | property |
sourcePoint:IPoint
A position in world coordinates representing the source of the SnapLine.
public function get sourcePoint():IPoint public function set sourcePoint(value:IPoint):voidSee also
| stroke | property |
stroke:IStroke
The stroke used in the paint method.
public function get stroke():IStroke public function set stroke(value:IStroke):voidSee also
| targetLineFrom | property |
targetLineFrom:IPointThe begin of the target line segment.
public function get targetLineFrom():IPoint public function set targetLineFrom(value:IPoint):void| targetLineTo | property |
targetLineTo:IPointThe end of the target line segment.
public function get targetLineTo():IPoint public function set targetLineTo(value:IPoint):void| targetPoint | property |
targetPoint:IPoint
The location in world coordinates where the target has snapped to the SnapLine.
public function get targetPoint():IPoint public function set targetPoint(value:IPoint):voidSee also
| paint | () | method |
public function paint(g:YGraphics, ctx:IPaintContext):void
Draws a line between sourceLineFrom and sourceLineTo as well as a double-pointed arrow
between distanceIndicatorFrom and distanceIndicatorTo.
The sourcePoint is further marked with a cross.
Parameters
g:YGraphics — The graphics object to paint upon.
| |
ctx:IPaintContext — The paint context.
|
See also