CCentroid:GetStartingPos


The GetStartingPos method returns the starting coordinates used for the centroid calculation. These values are the x and y values passed to the Calc method.

Syntax

nX, nY = CCentroid:GetStartingPos()

where

    nX, nY are the starting coordinates passed to the Calc method and are measured in pixel coordinates.

Example

 

C = CCentroid:new()

-- create a new CCentroid object

C:Calc( 100, 200 )

-- calculate the centroid near 100,200

Printf("X=%lf" Y=%lf, C:GetStartingPos() )

-- result: 100, 200

Related Topics

Y

Calc

CCentroid class

Image Coordinate System

Subpixel Coordinate Definition