Home :: GUI :: Shapes

  1. Introduction
  2. Reference
    1. Methods
      1. constructor
      2. init
      3. realize
      4. translate
      5. refresh
      6. registerHandles
      7. unregisterHandles
      8. selectHandles
      9. showHandles
      10. getIntersectionParams
    2. Properties
      1. p1
      2. p2
  3. Example
  4. Download

Introduction

Line is a JavaScript object that allows you to adjust a line by manipulating Handles: one for each end of the line. This code is used in the 2D Geometry section of this site

Line is a sub-class of the Shape object.


Reference

Methods

constructor - new Line(svgNode);

init(svgNode);

realize();

translate(delta);

refresh();

registerHandles();

unregisterHandles();

selectHandles();

showHandles();

getIntersectionParams() : IntersectionParams;

Properties


Example

This example allows you to adjust the end-points of the lines within the SVG document. Here is a brief summary of the editing procedures:


Download

Line.js - the line object only...cannot be used in isolation

2D.js.gz - all objects needed to use this object and other 2D geometry objects