RoundedRectPath

Parent Path
Library display.*
Revision Current Public Release (2017.3135)
See also display.newRoundedRect()
Perspective and Depth (guide)

Overview

The rounded rectangle path specifies the geometry of the corresponding rounded rectangle object.

This path has limited properties which let you manipulate specific aspects of the shape object. These aspects can either be set explicitly or animated via a transition.

Properties

(Inherits properties from Path)

path.height

Number. Height of the rounded rectangle.

path.radius

Number. Radius of the rounded rectangle corners.

path.width

Number. Width of the rounded rectangle.

Example

local roundedRect = display.newRoundedRect( 160, 240, 150, 50, 10 )
roundedRect.path.radius = 20

transition.to( roundedRect.path, { time=2000, width=100, height=100, radius=5 } )