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

From CDOT Wiki
Jump to: navigation, search
(Tag Attributes)
(Cube Tag Reference)
 
Line 1: Line 1:
= Cube Tag Reference =
+
= Rectangle 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 11: Line 11:
 
* position
 
* position
 
** '''Usage:''' <rectangle position="35, 53" />.
 
** '''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 is optional. If omitted, 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).
 
** 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

Latest revision as of 09:59, 13 April 2007

Rectangle 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 omitted, 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.