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

From CDOT Wiki
Jump to: navigation, search
 
(Cube Tag Reference)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Arc Tag Reference =
+
= Circle 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 Circle is one of the basic 2D primitives that can be created within canvas. The Circle Tag encompasses the various attributes that are associated with a Circle, such as position, size, height, as well as drawing styles.
  
 
== Tag Attributes ==
 
== Tag Attributes ==
  
* name
 
** '''Usage:''' <sphere name="mysphere" />.
 
** The ''name'' attribute is optional. If omited, 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:''' <circle position="35, 53" />.
** The ''position'' attribute is optional. If omited, 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).
* orientation
 
** '''Usage:''' <arc orientation="1.0, 1.0, 1.0" />.
 
** The ''orientation'' attribute defines the direction in which the Arc is facing. The direction is defined by a vector value.
 
** The orientation value only accepts three numbers that are separated by commas.
 
 
* size
 
* size
** '''Usage:''' <arc size="0.4" />.
+
** '''Usage:''' <circle size="40" />.
** The ''size'' attribute defines the size of the Sphere on the screen.
+
** The ''size'' attribute defines the diameter size of the circle.
* texture
+
** ''This attribute cannot be omitted.''
** '''Usage:''' <arc texture="mytexture" />
+
* fillcolor
** The ''texture'' attribute contains the name identifier of a texture that is defined inside the canvas tag.
+
** '''Usage:''' <circle fillcolor="#00FF00" />.
** If the texture does not exist or is not defined, a default color of white is applied to the Arc.
+
** The ''fillcolor'' attribute sets a specific color that will be painted inside the circle.
** The attribute must be Alpha-numeric and must point to a defined texture tag.
+
** This value, if omitted, will default to black (#000000).
 +
* bordercolor
 +
** '''Usage:''' <circle bordercolor="#FF00FF" />.
 +
** The ''bordercolor'' attribute sets a specific color of the border.
 +
** If omitted, the circle will be drawn borderless.
  
 
== Syntax ==
 
== Syntax ==
Line 35: Line 30:
 
<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" />
+
   <circle position="40, 40" size="30" fillcolor="#09a" bordercolor="#000" />
 
</canvas>
 
</canvas>
 
</pre>
 
</pre>

Latest revision as of 10:58, 13 April 2007

Circle Tag Reference

Back To XML 3D Main Page

Introduction

The Circle is one of the basic 2D primitives that can be created within canvas. The Circle Tag encompasses the various attributes that are associated with a Circle, such as position, size, height, as well as drawing styles.

Tag Attributes

  • position
    • Usage: <circle 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: <circle size="40" />.
    • The size attribute defines the diameter size of the circle.
    • This attribute cannot be omitted.
  • fillcolor
    • Usage: <circle fillcolor="#00FF00" />.
    • The fillcolor attribute sets a specific color that will be painted inside the circle.
    • This value, if omitted, will default to black (#000000).
  • bordercolor
    • Usage: <circle bordercolor="#FF00FF" />.
    • The bordercolor attribute sets a specific color of the border.
    • If omitted, the circle will be drawn borderless.

Syntax

<canvas>
  <circle position="40, 40" size="30" fillcolor="#09a" bordercolor="#000" />
</canvas>

References

  • None.