JavaScript must be enabled in order for you to use JSXGraph and JSXGraph reference. However, it seems JavaScript is either disabled or not supported by your browser.

Class Index | File Index

Elements

Classes


Element Line

JXG.GeometryElement
   ↳ JXG.Line
         ↳ Line

This element is used to provide a constructor for a general line. A general line is given by two points. By setting additional properties a line can be used as an arrow and/or axis.

Defined in: line.js.
Extends JXG.Line.

Element Summary
Constructor Attributes Constructor Name and Description
 
Attributes Summary
Field Attributes Field Name and Description
 
Line has an arrow head at the position of its first point or the corresponding intersection with the canvas border.
 
Attributes for the line label.
 
Line has an arrow head at the position of its second point or the corresponding intersection with the canvas border.
 
Attributes for first defining point of the line.
 
Attributes for second defining point of the line.
 
Defines together with JXG.Point#snapSizeY the grid the point snaps on to.
 
Defines together with JXG.Point#snapSizeX the grid the point snaps on to.
 
If set to true, the point will snap to a grid defined by JXG.Point#snapSizeX and JXG.Point#snapSizeY.
 
If true, line stretches infinitely in direction of its first point.
 
If true, line stretches infinitely in direction of its second point.
 
Attributes for ticks of the line.
 
If set to true and Line#firstArrow is set to true, the arrow head will just touch the circle line of the start point of the line.
 
If set to true and Line#lastArrow is set to true, the arrow head will just touch the circle line of the start point of the line.
Methods borrowed from class JXG.Line:
addTicks, addTransform, generatePolynomial, getAngle, getRise, getSlope, hasPoint, L, maxX, minX, removeAllTicks, removeTicks, setLabelRelativeCoords, setStraight, updateRenderer, updateSegmentFixedLength, updateStdform, X, Y, Z
Methods borrowed from class JXG.GeometryElement:
_set, addChild, addDescendants, addParents, addRotation, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getTextAnchor, getType, handleSnapToGrid, hideElement, labelColor, noHighlight, normalize, prepareUpdate, remove, removeChild, removeDescendants, resolveShortcuts, setArrow, setAttribute, setDash, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, showElement, snapToPoints, update
Events borrowed from class JXG.GeometryElement:
attribute, attribute:<attribute><attribute>, down, drag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, touchdown, touchdrag, touchup, up
Element Detail
Line
This element has no direct constructor. To create an instance of this element you have to call JXG.Board#create with type "line".

Possible parent array combinations are:
{JXG.Point|array|function} point1
{JXG.Point|array|function} point2

Parent elements can be two elements either of type JXG.Point or array of numbers describing the coordinates of a point. In the latter case the point will be constructed automatically as a fixed invisible point. It is possible to provide a function returning an array or a point, instead of providing an array or a point.


{Number|function} c
{Number|function} a
{Number|function} b

A line can also be created providing three numbers. The line is then described by the set of solutions of the equation a*x+b*y+c*z = 0. It is possible to provide three functions returning numbers, too.


{function} f

This function must return an array containing three numbers forming the line's homogeneous coordinates.


Throws:
{Exception}
If the element cannot be constructed with the given parent objects an exception is thrown.
Examples:
// Create a line using point and coordinates/
// The second point will be fixed and invisible.
var p1 = board.create('point', [4.5, 2.0]);
var l1 = board.create('line', [p1, [1.0, 1.0]]);

				
				
// Create a line using three coordinates
var l1 = board.create('line', [1.0, -2.0, 3.0]);

				
                
Attribute Detail
{Boolean} firstArrow
Line has an arrow head at the position of its first point or the corresponding intersection with the canvas border.
Defined in: options.js.
See:
Line#lastArrow
Line#touchFirstPoint
Default Value:
false

{Label} label
Attributes for the line label.
Defined in: options.js.

{Boolean} lastArrow
Line has an arrow head at the position of its second point or the corresponding intersection with the canvas border.
Defined in: options.js.
See:
Line#firstArrow
Line#touchLastPoint
Default Value:
false

{Point} point1
Attributes for first defining point of the line.
Defined in: options.js.

{Point} point2
Attributes for second defining point of the line.
Defined in: options.js.

{Number} snapSizeX
Defines together with JXG.Point#snapSizeY the grid the point snaps on to. The point will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction. If this value is equal to or less than 0, it will use the grid displayed by the major ticks of the default ticks of the default x axes of the board.
Defined in: options.js.
See:
Point#snapToGrid
Point#snapSizeY
JXG.Board#defaultAxes
Default Value:
1

{Number} snapSizeY
Defines together with JXG.Point#snapSizeX the grid the point snaps on to. The point will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction. If this value is equal to or less than 0, it will use the grid displayed by the major ticks of the default ticks of the default y axes of the board.
Defined in: options.js.
See:
Point#snapToGrid
Point#snapSizeX
Board#defaultAxes
Default Value:
1

{Boolean} snapToGrid
If set to true, the point will snap to a grid defined by JXG.Point#snapSizeX and JXG.Point#snapSizeY.
Defined in: options.js.
See:
Point#snapSizeX
Point#snapSizeY
Default Value:
false

{Boolean} straightFirst
If true, line stretches infinitely in direction of its first point. Otherwise it ends at point1.
Defined in: options.js.
See:
Line#straightLast
Default Value:
true

{Boolean} straightLast
If true, line stretches infinitely in direction of its second point. Otherwise it ends at point2.
Defined in: options.js.
See:
Line#straightFirst
Default Value:
true

{Ticks} ticks
Attributes for ticks of the line.
Defined in: options.js.

{Boolean} touchFirstPoint
If set to true and Line#firstArrow is set to true, the arrow head will just touch the circle line of the start point of the line.
Defined in: options.js.
See:
Line#firstArrow
Default Value:
false

{Boolean} touchLastPoint
If set to true and Line#lastArrow is set to true, the arrow head will just touch the circle line of the start point of the line.
Defined in: options.js.
See:
Line#firstArrow
Default Value:
false

Attributes borrowed from other Elements
Attributes borrowed from class JXG.GeometryElement:
dash, draft, fillColor, fillOpacity, fixed, frozen, highlight, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, needsRegularUpdate, scalable, shadow, strokeColor, strokeOpacity, strokeWidth, trace, traceAttributes, visible, withLabel

Fields borrowed from other Elements
Fields borrowed from class JXG.Line:
defaultTicks, parentPolygon
Fields borrowed from class JXG.GeometryElement:
_org_type, _pos, ancestors, baseElement, board, childElements, descendants, dump, elementClass, elType, hasLabel, highlighted, id, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsUpdate, notExistingParents, numTraces, parents, quadraticform, rendNode, stdform, subs, symbolic, traces, transformations, type, visProp

Methods borrowed from other Elements
Methods borrowed from class JXG.Line:
addTicks, addTransform, generatePolynomial, getAngle, getRise, getSlope, hasPoint, L, maxX, minX, removeAllTicks, removeTicks, setLabelRelativeCoords, setStraight, updateRenderer, updateSegmentFixedLength, updateStdform, X, Y, Z
Methods borrowed from class JXG.GeometryElement:
_set, addChild, addDescendants, addParents, addRotation, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getTextAnchor, getType, handleSnapToGrid, hideElement, labelColor, noHighlight, normalize, prepareUpdate, remove, removeChild, removeDescendants, resolveShortcuts, setArrow, setAttribute, setDash, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, showElement, snapToPoints, update

Events borrowed from other Elements
Events borrowed from class JXG.GeometryElement:
attribute, attribute:<attribute><attribute>, down, drag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, touchdown, touchdrag, touchup, up
Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jul 05 2016 11:01:14 GMT+0200 (CEST)