Class Mirrorelement
JXG.GeometryElement
↳ Mirrorelement
A mirror element will be constructed.
Defined in: composition.js.
Extends
JXG.GeometryElement.
Constructor Attributes | Constructor Name and Description |
---|---|
Mirrorelement(p1,p2)
A mirror element is determined by the reflection of a given point across another given point.
|
- Fields borrowed from class JXG.GeometryElement:
- _org_type, _pos, ancestors, baseElement, board, childElements, dash, descendants, draft, dump, elementClass, elType, fillColor, fillOpacity, fixed, frozen, hasLabel, highlight, highlighted, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, inherits, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, parents, quadraticform, rendNode, scalable, shadow, snapToGrid, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, trace, traceAttributes, traces, transformations, transitionDuration, type, visible, visProp, visPropCalc, withLabel
- Fields borrowed from class JXG.GeometryElement:
- _org_type, _pos, ancestors, baseElement, board, childElements, dash, descendants, draft, dump, elementClass, elType, fillColor, fillOpacity, fixed, frozen, hasLabel, highlight, highlighted, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, inherits, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, parents, quadraticform, rendNode, scalable, shadow, snapToGrid, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, trace, traceAttributes, traces, transformations, transitionDuration, type, visible, visProp, visPropCalc, withLabel
- Methods borrowed from class JXG.GeometryElement:
- _set, addChild, addDescendants, addParents, addRotation, addTransform, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, fullUpdate, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getTextAnchor, getType, handleSnapToGrid, hasPoint, hideElement, labelColor, noHighlight, normalize, prepareUpdate, remove, removeChild, removeDescendants, resolveShortcuts, setArrow, setAttribute, setDash, setDisplayRendNode, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, showElement, snapToPoints, update, updateRenderer, updateVisibility
- 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
Class Detail
Mirrorelement(p1,p2)
A mirror element is determined by the reflection of a given point across another given point.
- Parameters:
- {JXG.Point|JXG.Line|JXG.Curve|JXG.Ppolygon_JXG.Point} p1,p2
- The constructed element is the mirror image of p2 across p1.
- Throws:
- {Error}
- If the element cannot be constructed with the given parent objects an exception is thrown.
- Examples:
// point of reflection var mirr = board.create('point', [-1,-1], {color: '#aaaaaa'}); var t = board.create('transform', [Math.PI, mirr], {type: 'rotate'}); var p1 = board.create('point', [-3,-1], {name: "A"}); var q1 = board.create('mirrorelement', [p1, mirr], {name: "A'"}); var l1 = board.create('line', [1,-5,1]); var l2 = board.create('mirrorelement', [l1, mirr]); var cu1 = board.create('curve', [[-1, -1, -0.5, -1, -1, -0.5], [-3, -2, -2, -2, -2.5, -2.5]]); var cu2 = board.create('mirrorelement', [cu1, mirr], {strokeColor: 'red'}); var pol1 = board.create('polygon', [[-3,-2], [-1,-4], [-2,-0.5]]); var pol2 = board.create('mirrorelement', [pol1, mirr]);