Class Index | File Index

Classes


Class Polygon


Extends JXG.Polygon.
A polygon is an area enclosed by a set of border lines which are determined by a list of points. Each two consecutive points of the list define a line.
Defined in: Polygon.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Polygon(vertices)
Fields borrowed from class JXG.Polygon:
borders, hasInnerPoints, vertices, withLines
Fields borrowed from class JXG.GeometryElement:
addEvent, ancestors, board, childElements, descendants, draft, dump, elementClass, elType, eventHandlers, fillOpacity, fixed, frozen, getAttribute, hasLabel, highlighted, highlightFillOpacity, highlightStrokeOpacity, highlightStrokeWidth, id, isDraggable, isReal, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, quadraticform, removeEvent, scalable, stdform, strokeOpacity, subs, symbolic, trace, traceAttributes, traces, transformations, type, 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, dash, fillColor, getAttributes, getLabelAnchor, getName, getParents, getProperty, getType, highlight, highlightFillColor, highlightStrokeColor, labelColor, noHighlight, off, on, resolveShortcuts, setArrow, setAttribute, setLabelText, setProperty, shadow, snapToGrid, strokeColor, strokeWidth, triggerEventHandlers, update, visible
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
Polygon(vertices)
var p1 = board.create('point', [0.0, 2.0]);
var p2 = board.create('point', [2.0, 1.0]);
var p3 = board.create('point', [4.0, 6.0]);
var p4 = board.create('point', [1.0, 3.0]);

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

				
				
				
				
					
						
Parameters:
{Array} vertices
The polygon's vertices. If the first and the last vertex don't match the first one will be added to the array by the creator.
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 Fri May 31 2013 05:21:38 GMT-0000 (UTC)