Class: LineSegment

LineSegment

represents line segment connecting two points

new LineSegment(point1, point2, attrs)

Line segment [Raphael.path]
This:
Parameters:
Name Type Argument Description
point1 RaphaelTools.Point2d 1st Point2d
point2 RaphaelTools.Point2d 2nd Point2d
attrs Object <optional>
attributes passed to Raphael.path().attr(attrs)
Properties:
Name Type Description
point1 Point first point of line
point2 Point second point of line
copies Array.<Raphael.fn.LineSegment> array of copies of receiver
copiesPoints Array.<Array.<RaphaelTools.Point2d>> 2 element arrays of array of points of copies of receiver
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 567

Extends

  • Raphael.fn

Methods

copy(points)

Copy receiver
Parameters:
Name Type Description
points Array.<Array.<RaphaelTools.Point2d>> 2 element array of array of points points of to be copied lines
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 589

makeCopy() → {Raphael.fn.LineSegment}

Returns copy of receiver
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 601
Returns:
copy of receiver
Type
Raphael.fn.LineSegment

update()

Update receiver (set this.pathList for given internal variables - x,y,angle... - as well as its copies)
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 578