Overview
Creates a rectangle shape.
Rect class inherits Display class, therefore all the methods defined in Display class can also be used in the Rect object.
Syntax
• width - (required) width of rectangle
• height - height of rectangle (if omitted, it is set as the width given)
• option - (optional) table of extra parameters
{
strokeWidth = n, -- (optional) set width of stroke (default:0)
strokeColor = color, -- (optional) set stroke color as Color object (default:Color.WHITE)
fill = color -- (optional) set fill color as Color object (default:Color.WHITE)
}
Note that the initial anchor point is the center of the rectangle.
Note also that if the alpha of fillcolor is 0, hollow rectangle will be drawn.
Methods
methods inheritted from Shape class :
Rect class methods :
댓글 없음:
댓글 쓰기