Packagecom.yworks.yfiles.geom
Classpublic class AffineLine
InheritanceAffineLine Inheritance YObject Inheritance Object

This class represents a line in the 2D-dimensional affine space. The line is defined by the equation ax + by + c = 0



Public Properties
 PropertyDefined By
  a : Number
[read-only] Returns a from ax+by+c = 0
AffineLine
  b : Number
[read-only] Returns b from ax+by+c = 0
AffineLine
  c : Number
[read-only] Returns c from ax+by+c = 0
AffineLine
Public Methods
 MethodDefined By
  
AffineLine(p1:YPoint, p2:YPoint, init:Boolean = true)
Creates an affine line which is defined by two points.
AffineLine
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
AffineLine
  
[static] Returns the crossing of two lines.
AffineLine
  
Projects an point on the line in direction of the X-axis.
AffineLine
  
Projects an point on the line in direction of the Y-axis.
AffineLine
 Inherited
hashCode():int
YObject
  
[static] Creates an affine line which is defined by two points.
AffineLine
  
[static] Creates an affine line which is defined by a point and a vector.
AffineLine
  
toString():String
Returns the equation of the line as String
AffineLine
Protected Methods
 MethodDefined By
  
Initializes this object.
AffineLine
  
Initializes this object.
AffineLine
Property Detail
aproperty
a:Number  [read-only]

Returns a from ax+by+c = 0


Implementation
    public function get a():Number
bproperty 
b:Number  [read-only]

Returns b from ax+by+c = 0


Implementation
    public function get b():Number
cproperty 
c:Number  [read-only]

Returns c from ax+by+c = 0


Implementation
    public function get c():Number
Constructor Detail
AffineLine()Constructor
public function AffineLine(p1:YPoint, p2:YPoint, init:Boolean = true)

Creates an affine line which is defined by two points.

Parameters
p1:YPoint
 
p2:YPoint
 
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.
Method Detail
getClass()method
override public function getClass():Class

Returns
Class
getCrossing()method 
public static function getCrossing(l1:AffineLine, l2:AffineLine):YPoint

Returns the crossing of two lines. If the lines are parallel, null is returned.

Parameters

l1:AffineLine
 
l2:AffineLine

Returns
YPoint
getXProjection()method 
public function getXProjection(p:YPoint):YPoint

Projects an point on the line in direction of the X-axis.

Parameters

p:YPoint

Returns
YPoint
getYProjection()method 
public function getYProjection(p:YPoint):YPoint

Projects an point on the line in direction of the Y-axis.

Parameters

p:YPoint

Returns
YPoint
initAffineLine1()method 
protected final function initAffineLine1(p1:YPoint, p2:YPoint):void

Initializes this object. See the documentation of the corresponding factory method newAffineLine1() for details.

Parameters

p1:YPoint
 
p2:YPoint

See also

initAffineLine2()method 
protected final function initAffineLine2(p1:YPoint, v:YVector):void

Initializes this object. See the documentation of the corresponding factory method newAffineLine2() for details.

Parameters

p1:YPoint
 
v:YVector

See also

newAffineLine1()method 
public static function newAffineLine1(p1:YPoint, p2:YPoint):AffineLine

Creates an affine line which is defined by two points.

Parameters

p1:YPoint
 
p2:YPoint

Returns
AffineLine
newAffineLine2()method 
public static function newAffineLine2(p1:YPoint, v:YVector):AffineLine

Creates an affine line which is defined by a point and a vector.

Parameters

p1:YPoint
 
v:YVector

Returns
AffineLine
toString()method 
public function toString():String

Returns the equation of the line as String

Returns
String