object.contentHeight

Type Number
Object DisplayObject
Library display.*
Revision Release 2024.3703
Keywords content height

Overview

The read-only height of the object in content coordinates. This is similar to object.height except that its value is affected by y scaling and rotation.

Example

local rect = display.newRect( 100, 100, 50, 50 )
rect.rotation = 25
rect:setFillColor( 1, 0, 0 )

print( "contentHeight: ".. rect.contentHeight )