Lingo Dictionary > O-R > rect (image) |  |

rect (image)

Syntax

    imageObject.rect

Description

Read-only property; returns a rectangle describing the size of the given image object. The coordinates are given relative to the top left corner of the image. The left and top values of the rectangle are therefore always 0, and the right and bottom values are the width and height of the cast member.

Example

This statement returns the rectangle of the 300 x 400 pixel member Sunrise in the message window:

    put member("Sunrise").image.rect
    -- rect(0, 0, 300, 400)

Example

This Lingo looks at the first 50 cast members and displays the rectangle and name of each cast member that is a bitmap:

    on showAllRects
    	repeat with x = 1 to 50
    		if member(x).type = #bitmap then
    			put member(x).image.rect && "-" && member(x).name
    		end if
    	end repeat
    end

See also

`height`, `width`