Class Index | File Index

Classes


Class RegularPolygon


Extends Polygon.
Constructs a regular polygon. It needs two points which define the base line and the number of vertices.
Defined in: Polygon.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
RegularPolygon(p1,p2,n)
Constructs a regular polygon.
Fields borrowed from class JXG.Polygon:
borders, hasInnerPoints, vertices, withLines
Fields borrowed from class JXG.GeometryElement:
addEvent, ancestors, board, childElements, dash, descendants, draft, dump, elementClass, elType, eventHandlers, fillColor, fillOpacity, fixed, frozen, getAttribute, hasLabel, highlight, highlighted, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, isDraggable, isReal, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, quadraticform, removeEvent, scalable, shadow, snapToGrid, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, trace, traceAttributes, traces, transformations, type, visible, visProp, withLabel
Methods borrowed from class JXG.Polygon:
addPoints, Area, findPoint, getTextAnchor, hasPoint, hideElement, insertPoints, remove, removePoints, setPositionDirectly, showElement, updateRenderer
Methods borrowed from class JXG.GeometryElement:
addChild, addRotation, addTransform, animate, bounds, clearTrace, cloneToBackground, createLabel, getAttributes, getLabelAnchor, getName, getParents, getProperty, getType, labelColor, noHighlight, off, on, resolveShortcuts, setArrow, setAttribute, setLabelText, setProperty, triggerEventHandlers, 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
Class Detail
RegularPolygon(p1,p2,n)
Constructs a regular polygon. It needs two points which define the base line and the number of vertices, or a set of points.
var p1 = board.create('point', [0.0, 2.0]);
var p2 = board.create('point', [2.0, 1.0]);

var pol = board.create('regularpolygon', [p1, p2, 5]);

				
				
var p1 = board.create('point', [0.0, 2.0]);
var p2 = board.create('point', [4.0,4.0]);
var p3 = board.create('point', [2.0,0.0]);

var pol = board.create('regularpolygon', [p1, p2, p3]);

				
				
				
				
					
						
Parameters:
{JXG.Point_JXG.Point_Number} p1,p2,n
The constructed regular polygon has n vertices and the base line defined by p1 and p2.
Throws:
{Exception}
If the element cannot be constructed with the given parent objects an exception is thrown.

Documentation generated by JsDoc Toolkit 2.4.0 on Thu May 30 2013 23:22:19 GMT+0200 (CEST)