Canvas 3D - Arc Tag

From CDOT Wiki
Revision as of 17:11, 10 February 2007 by RealMarkP (talk | contribs)
Jump to: navigation, search

Cube Tag Reference

Back To XML 3D Main Page

Introduction

The Arc is one of the basic 2D primitives that can be created within canvas. The ArcTag encompasses the various attributes that are associated with an Arc, such as position, size, height, starting and ending pointers, as well as drawing styles.

Tag Attributes

  • position
    • Usage: <arc position="35, 53" />.
    • The position attribute is optional. If omited, the position defaults to the Origin location at {0, 0}.
    • The position attribute holds a set of two numbers separated by commas that are associated with the distance away from the Origin Point of (0, 0).
  • size
    • Usage: <arc size="40" />.
    • The size attribute defines the diameter size of the arc.
    • This attribute cannot be omitted.
  • fillcolor
    • Usage: <arc fillcolor="#00FF00" />.
    • The fillcolor attribute sets a specific color that will be painted inside the arc.
    • This value, if omitted, will default to black (#000000).
  • bordercolor
    • Usage: <arc bordercolor="#FF00FF" />.
    • The bordercolor attribute sets a specific color of the border.
    • If omitted, the arc will be drawn borderless.
  • startrad
    • Usage: <arc startrad="3.14" />.
    • The startrad attribute defines the angle at which the arc will start at.
    • This attribute uses rad rather then degrees. Further implementation will accept both.
    • This attribute cannot be omitted.
  • endrad
    • Usage: <arc endrad="4.0" />.
    • The endrad attribute defines the angle at which the arc will end at.
    • This attribute uses rad rather then degrees. Further implementation will accept both.
    • This attribute cannot be omitted.
  • clockwise
    • Usage: <arc clockwise="true" />.
    • The clockwise attribute sets the drawing direction of the arc.
    • This attribute accepts only true or false values.
    • This attribute cannot be omitted.


Syntax

<canvas>
  <arc position="100, 300" size="58" fillcolor="#D0D" bordercolor="#0FF" startrad="3.14" endrad="0" clockwise="true" />
</canvas>

References

  • None.