Difference between revisions of "Canvas 3D - Arc Tag"

From CDOT Wiki
Jump to: navigation, search
(Tag Attributes)
Line 1: Line 1:
= Arc Tag Reference =
+
= Cube Tag Reference =
  
 
[[XML_3D_-_BTS530/630 Project|Back To XML 3D Main Page]]
 
[[XML_3D_-_BTS530/630 Project|Back To XML 3D Main Page]]
Line 5: Line 5:
 
== Introduction ==
 
== Introduction ==
  
The Arc is one of the basic primitives that can be created on the fly. The Arc Tag encompasses the various attributes that are associated with a Arc, such as position, size and orientation. In addition, the Arc can be textured with a predefined image from a specific location.
+
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 ==
 
== Tag Attributes ==
  
* name
 
** '''Usage:''' <arc name="myarc" />.
 
** The ''name'' attribute is optional. If omitted, the name is not used and thus cannot be retrieved within JavaScript.
 
** The Arc is given an Identifier so that It can be retrieved and modified within JavaScript.
 
** The name is a only accepts a string of Alpha-numeric characters.
 
 
* position
 
* position
** '''Usage:''' <arc position="0.3, 5.5, 3.8" />.
+
** '''Usage:''' <arc position="35, 53" />.
** The ''position'' attribute is optional. If omitted, the position defaults to the Origin location at {0.0, 0.0, 0.0}.
+
** The ''position'' attribute is optional. If omited, the position defaults to the Origin location at {0, 0}.
** The position attribute holds a set of three floating point numbers separated by commas that are associated with the distance away from the Origin Point on the X, Y, and Z axis.
+
** 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
 
* size
** '''Usage:''' <arc size="0.4" />.
+
** '''Usage:''' <arc size="40" />.
** The ''size'' attribute defines the size of the Sphere on the screen.
+
** 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 ==
 
== Syntax ==
Line 26: Line 46:
 
<pre>
 
<pre>
 
<canvas>
 
<canvas>
   <arc name="myarc" position="0.0, 0.3, 0.5" orientation="0.2, 0.6, 1.3" size="1.9" texture="mytexture" />
+
   <arc position="100, 300" size="58" fillcolor="#D0D" bordercolor="#0FF" startrad="3.14" endrad="0" clockwise="true" />
 
</canvas>
 
</canvas>
 
</pre>
 
</pre>

Revision as of 17:11, 10 February 2007

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.