Skip to content

roundedrect

Eloy Villasclaras edited this page Apr 18, 2016 · 1 revision

<roundedrect> draws a rectangle with rounded corners within a <graphics> or a <shape>.

Properties

Property Notes
x Horizontal position of the rectangle
y Vertical position of the rectangle
width Rectangle width
height Rectangle height
radius Radius of rectangle corners

Style

When a <roundedrect> is a child of a <shape>, it inherits its fill and line style. On the other hand, when defined directly under a <graphics> a <roundedrect> can define its own style:

Property Type Default Notes
fill number transparent Fill color
fillAlpha number 1 Defines fill color transparency. Between 0 (transparent) and 1 (opaque)
stroke number 0x000000 Line color; a line is rendered if any of stroke, strokeWidth or strokeAlpha is defined
strokeWidth number 1 Line width, in pixels
strokeAlpha number 1 Line color transparency
Clone this wiki locally