CRect:SetXmax CRect:Union

CRect:Size


The Size method returns the x and y length of the CRect object. The size is measured in pixel coordinates.

Syntax

nSizeX, nSizeY = CRect:Size()

bullet.gif    nX and nY are numbers and may be positive or negative.

Example

The following script prints the x and y dimensions of the CRect:

R = new_rect()

-- create a CRect object

R:Set(50,60,250,360)

--set the rectangle data

nX, nY = R:Size()

-- returns the width and height

Printf( "nx=%.0lf, ny=%.0lf\n", nX,nY)

-- prints nx=200, ny=300

Related Topics

CRect class, Get, Image Coordinate System, Subpixel Coordinate Definition

 

Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.