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

From CDOT Wiki
Jump to: navigation, search
 
(Tag Attributes)
Line 14: Line 14:
 
** 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).
 
** 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).
 
* width
 
* width
** '''Usage:''' <cube width="10" />.
+
** '''Usage:''' <rectangle width="10" />.
 
** The ''width'' attribute defines the width of the rectangle.
 
** The ''width'' attribute defines the width of the rectangle.
 
** ''This attribute cannot be omitted.''
 
** ''This attribute cannot be omitted.''
 
* height
 
* height
** '''Usage:''' <cube height="30" />.
+
** '''Usage:''' <rectangle height="30" />.
 
** The ''height'' attribute defines the height of the rectangle.
 
** The ''height'' attribute defines the height of the rectangle.
 
** ''This attribute cannot be omitted.''
 
** ''This attribute cannot be omitted.''
 
* fillcolor
 
* fillcolor
** '''Usage:''' <cube fillcolor="#00FF00" />.
+
** '''Usage:''' <rectangle fillcolor="#00FF00" />.
 
** The ''fillcolor'' attribute sets a specific color that will be painted inside the rectangle.
 
** The ''fillcolor'' attribute sets a specific color that will be painted inside the rectangle.
 
** This value, if omitted, will default to black (#000000).
 
** This value, if omitted, will default to black (#000000).
 
* bordercolor
 
* bordercolor
** '''Usage:''' <cube bordercolor="#FF00FF" />.
+
** '''Usage:''' <rectangle bordercolor="#FF00FF" />.
 
** The ''bordercolor'' attribute sets a specific color of the border.
 
** The ''bordercolor'' attribute sets a specific color of the border.
 
** If omitted, the square will be drawn borderless.
 
** If omitted, the square will be drawn borderless.

Revision as of 16:12, 10 February 2007

Cube Tag Reference

Back To XML 3D Main Page

Introduction

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

Tag Attributes

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

Syntax

<canvas>
  <rectangle position="80, 80" width="44" height="85" fillcolor="#49a" bordercolor="#F00" />
</canvas>

References

  • None.