Element Hatch
JXG.GeometryElement
↳ JXG.Ticks
↳ Hatch
Hatches can be used to mark congruent lines or curves.
Defined in: ticks.js.
Extends
JXG.Ticks.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
The default distance (in user coordinates, not pixels) between two hatch symbols.
|
- Methods borrowed from class JXG.Ticks:
- _isInsideCanvas, beautifyScientificNotationLabel, calculateTicksCoordinates, createTickPath, formatLabelText, generateEquidistantTicks, generateFixedTicks, generateLabelData, generateLabelText, getDistanceFromZero, getDistanceMajorTicks, getLowerAndUpperBounds, getXandYdeltas, getZeroCoordinates, hasPoint, processTickPosition, setPositionDirectly, setTicksSizeVariables, update, updateRenderer, updateRendererLabels
- Methods borrowed from class JXG.GeometryElement:
- _set, addChild, addDescendants, addParents, addParentsFromJCFunctions, addRotation, addTicks, addTransform, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, eval, evalVisProp, formatNumberLocale, fullUpdate, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getSnapSizes, getTextAnchor, getType, handleSnapToGrid, hide, hideElement, noHighlight, normalize, prepareUpdate, remove, removeAllTicks, removeChild, removeDescendants, removeTicks, resolveShortcuts, setArrow, setAttribute, setDash, setDisplayRendNode, setLabel, setLabelText, setName, setParents, setPosition, setProperty, show, showElement, snapToPoints, updateVisibility, useLocale
- Events borrowed from class JXG.GeometryElement:
- attribute, attribute:key, down, drag, keydrag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, pendown, pendrag, penup, touchdown, touchdrag, touchup, up
Element Detail
Hatch
-
This element has no direct constructor. To create an instance of this element you have to call JXG.Board#create
with type "hatch".
- Possible parent array combinations are:
-
{JXG.Line|JXG.curve} line
- The line or curve the hatch marks are going to be attached to.
-
{Number} numberofhashes
- Number of dashes. The distance of the hashes can be controlled with the attribute ticksDistance.
- Throws:
- {Exception}
- If the element cannot be constructed with the given parent objects an exception is thrown.
- Examples:
// Create an axis providing two coords pairs. var p1 = board.create('point', [0, 3]); var p2 = board.create('point', [1, 3]); var l1 = board.create('line', [p1, p2]); var t = board.create('hatch', [l1, 3]);
// Alter the position of the hatch var p = board.create('point', [-5, 0]); var q = board.create('point', [5, 0]); var li = board.create('line', [p, q]); var h = board.create('hatch', [li, 2], {anchor: 0.2, ticksDistance:0.4});
// Alternative hatch faces var li = board.create('line', [[-6,0], [6,3]]); var h1 = board.create('hatch', [li, 2], {tickEndings: [1,1], face:'|'}); var h2 = board.create('hatch', [li, 2], {tickEndings: [1,1], face:'>', anchor: 0.3}); var h3 = board.create('hatch', [li, 2], {tickEndings: [1,1], face:'<', anchor: 0.7});
Field Detail
{Number}
ticksDistance
The default distance (in user coordinates, not pixels) between two hatch symbols.
Defined in: options.js.
Defined in: options.js.
- Default Value:
- 0.2
Attributes borrowed from other Elements
- Attributes borrowed from class JXG.GeometryElement:
- aria, cssClass, dash, dashScale, draft, dragToTopOfLayer, element3D, fillColor, fillOpacity, fixed, frozen, gradient, gradientAngle, gradientCX, gradientCY, gradientEndOffset, gradientFR, gradientFX, gradientFY, gradientR, gradientSecondColor, gradientSecondOpacity, gradientStartOffset, highlight, highlightCssClass, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, isLabel, layer, lineCap, needsRegularUpdate, nonnegativeOnly, precision, priv, rotatable, scalable, shadow, snapToGrid, strokeColor, strokeOpacity, strokeWidth, tabindex, trace, traceAttributes, transitionDuration, transitionProperties, visible, withLabel
Fields borrowed from other Elements
- Fields borrowed from class JXG.Ticks:
- board, equidistant, fixedTicks, labelCounter, labels, labelsData, line, ticks
- Fields borrowed from class JXG.GeometryElement:
- _org_type, _pos, ancestors, baseElement, childElements, descendants, dump, elementClass, elType, hasLabel, highlighted, id, inherits, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsUpdate, notExistingParents, numTraces, parents, quadraticform, rendNode, stdform, subs, symbolic, traces, transformations, type, visProp, visPropCalc
Methods borrowed from other Elements
- Methods borrowed from class JXG.Ticks:
- _isInsideCanvas, beautifyScientificNotationLabel, calculateTicksCoordinates, createTickPath, formatLabelText, generateEquidistantTicks, generateFixedTicks, generateLabelData, generateLabelText, getDistanceFromZero, getDistanceMajorTicks, getLowerAndUpperBounds, getXandYdeltas, getZeroCoordinates, hasPoint, processTickPosition, setPositionDirectly, setTicksSizeVariables, update, updateRenderer, updateRendererLabels
- Methods borrowed from class JXG.GeometryElement:
- _set, addChild, addDescendants, addParents, addParentsFromJCFunctions, addRotation, addTicks, addTransform, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, eval, evalVisProp, formatNumberLocale, fullUpdate, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getSnapSizes, getTextAnchor, getType, handleSnapToGrid, hide, hideElement, noHighlight, normalize, prepareUpdate, remove, removeAllTicks, removeChild, removeDescendants, removeTicks, resolveShortcuts, setArrow, setAttribute, setDash, setDisplayRendNode, setLabel, setLabelText, setName, setParents, setPosition, setProperty, show, showElement, snapToPoints, updateVisibility, useLocale
Events borrowed from other Elements