Packagecom.yworks.canvas.drawing
Classpublic class FixedDistanceSnapResultPaintable
InheritanceFixedDistanceSnapResultPaintable Inheritance Object
Implements IPaintable

This class visualizes the snapping of a moved object (target) to a 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

SnapLine


Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined By
  
Draws a line between sourceLineFrom and sourceLineTo as well as a double-pointed arrow between distanceIndicatorFrom and distanceIndicatorTo.
FixedDistanceSnapResultPaintable
Property Detail
_distanceproperty
public var _distance:Number

_distanceIndicatorFromproperty 
public var _distanceIndicatorFrom:IPoint

_distanceIndicatorToproperty 
public var _distanceIndicatorTo:IPoint

_sourceLineFromproperty 
public var _sourceLineFrom:IPoint

_sourceLineToproperty 
public var _sourceLineTo:IPoint

_sourcePointproperty 
public var _sourcePoint:IPoint

_strokeproperty 
public var _stroke:IStroke

_targetLineFromproperty 
public var _targetLineFrom:IPoint

_targetLineToproperty 
public var _targetLineTo:IPoint

_targetPointproperty 
public var _targetPoint:IPoint

distanceproperty 
distance:Number

The distance from the source the target has snapped to.


Implementation
    public function get distance():Number
    public function set distance(value:Number):void
distanceIndicatorFromproperty 
distanceIndicatorFrom:IPoint

The begin of the distance indicator line.


Implementation
    public function get distanceIndicatorFrom():IPoint
    public function set distanceIndicatorFrom(value:IPoint):void
distanceIndicatorToproperty 
distanceIndicatorTo:IPoint

The end of the distance indicator line.


Implementation
    public function get distanceIndicatorTo():IPoint
    public function set distanceIndicatorTo(value:IPoint):void
sourceLineFromproperty 
sourceLineFrom:IPoint

The begin of the source line segment.


Implementation
    public function get sourceLineFrom():IPoint
    public function set sourceLineFrom(value:IPoint):void
sourceLineToproperty 
sourceLineTo:IPoint

The end of the source line segment.


Implementation
    public function get sourceLineTo():IPoint
    public function set sourceLineTo(value:IPoint):void
sourcePointproperty 
sourcePoint:IPoint

A position in world coordinates representing the source of the SnapLine.


Implementation
    public function get sourcePoint():IPoint
    public function set sourcePoint(value:IPoint):void

See also

SnapLine
SnapLineSnapResult
strokeproperty 
stroke:IStroke

The stroke used in the paint method.


Implementation
    public function get stroke():IStroke
    public function set stroke(value:IStroke):void

See also

targetLineFromproperty 
targetLineFrom:IPoint

The begin of the target line segment.


Implementation
    public function get targetLineFrom():IPoint
    public function set targetLineFrom(value:IPoint):void
targetLineToproperty 
targetLineTo:IPoint

The end of the target line segment.


Implementation
    public function get targetLineTo():IPoint
    public function set targetLineTo(value:IPoint):void
targetPointproperty 
targetPoint:IPoint

The location in world coordinates where the target has snapped to the SnapLine.


Implementation
    public function get targetPoint():IPoint
    public function set targetPoint(value:IPoint):void

See also

SnapLine
SnapLineSnapResult
Method Detail
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