Open main menu

CDOT Wiki β

Canvas 3D - Rectangle Tag

Revision as of 17:05, 10 February 2007 by RealMarkP (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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: <cube width="10" />.
    • The width attribute defines the width of the rectangle.
    • This attribute cannot be omitted.
  • height
    • Usage: <cube height="30" />.
    • The height attribute defines the height of the rectangle.
    • This attribute cannot be omitted.
  • fillcolor
    • Usage: <cube 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: <cube 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.