CRect:Width


The Width method returns the x dimension, or "width" of the CRect object. The Size method returns both the width and height.

Syntax

nWidth = CRect:Width()

where

    nWidth is a number and may be positive or negative.

Example

The following script prints the width of the CRect:

R = NewRect(100,250,-400,-1200)

-- create a CRect object

Printf( "Width= %.2lf\n", R:Width())

-- result: Width = 150.00

Related Topics

Size

Height

CRect class