Referencetriangle

<triangle>

<triangle> is a Graphical component that renders a triangle when nested inside a <graph> component.

Attributes and Properties

Attributes for <triangle>
AttributeTypeValues
allowDilation = "…"boolean"true" "false"
allowRotation = "…"boolean"true" "false"
allowTranslation = "…"boolean"true" "false"
applyStyleToLabel = "…"boolean"true" "false"
displayDecimals = "…"integer
displayDigits = "…"integer
displaySmallAsZero = "…"number
draggable = "…"boolean"true" "false"
filled = "…"boolean"true" "false"
labelIsName = "…"boolean"true" "false"
layer = "…"integer
minShrink = "…"
padZeros = "…"boolean"true" "false"
preserveSimilarity = "…"boolean"true" "false"
rigid = "…"boolean"true" "false"
rotateAround = "…""centroid" "vertex" "point"
rotationCenter = "…"
rotationHandleVertices = "…"
rotationVertex = "…"
showCoordsWhenDragging = "…"boolean"true" "false"
vertices = "…"[ math ]
verticesDraggable = "…"boolean"true" "false"
Props for <triangle name="t">
PropertyType
$t.allowDilationboolean
$t.allowRotationboolean
$t.allowTranslationboolean
$t.applyStyleToLabelboolean
$t.areanumber
$t.borderStyleDescriptiontext
$t.disabledboolean
$t.displayDecimalsinteger
$t.displayDigitsinteger
$t.displaySmallAsZeronumber
$t.draggableboolean
$t.filledboolean
$t.fillStyleDescriptiontext
$t.fixedboolean
$t.fixLocationboolean
$t.hiddenboolean
$t.labellabel
$t.labelIsNameboolean
$t.layerinteger
$t.numDimensionsnumber
$t.numSidesnumber
$t.numVerticesnumber
$t.padZerosboolean
$t.perimeternumber
$t.preserveSimilarityboolean
$t.rigidboolean
$t.showCoordsWhenDraggingboolean
$t.styleDescriptiontext
$t.styleDescriptionWithNountext
$t.vertices[ math ]
$t.verticesDraggableboolean

Example: Default <triangle>

The default <triangle> has vertices at (0,0),(1,0)(0,0), (1,0) and (0,1)(0,1)


Example: <triangle> constrained to a grid

The vertices of a <triangle> are predefined as constrained points, thereby constraining the triangle to a grid as well.


Attribute Example: vertices

The vertices attribute takes a list of points as its input.


Attribute Example: filled

The filled attribute renders the triangle with default shading to match the styleNumber.


Attribute Example: draggable

The draggable attribute determines whether the <triangle> can be dragged around the <graph>. All graphical objects are draggable by default.


Attribute Example: verticesDraggable

Vertices are draggable by default. Use the verticesDraggable attribute set to false to disable users from changing the proportions of the <triangle>. The triangle as a whole can still be repositioned on the <graph>.


Attribute Example: Standard graphical attributes

The uses of the following standard graphical attributes are illustrated: hide, fixLocation, layer, styleNumber, applyStyleToLabel and labelIsName.


Properthy Example: Style properties

The styleDescription, styleDescriptionWithNoun, fillStyleDescription, and borderStyleDescription properties render a text description corresponding to the styleNumber of the component.