Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 741 Bytes

File metadata and controls

39 lines (31 loc) · 741 Bytes

Centroid

Description

Returns the centroid of the object. Returns false if an unsupported object type is supplied.

FUNCTION Centroid(
				h     : HANDLE;
				VAR x : REAL;
				VAR y : REAL): BOOLEAN;
def vs.Centroid(h):
    return (BOOLEAN, x, y)

Parameters

Name Type Description
h HANDLE
x REAL
y REAL

Remarks

([[User:CBM-c-|c]] 2016.04.18): This returns mm, so convert the values into current units: IF Centroid(h, c.x, c.y) THEN BEGIN { centroid returns mm } c.x := c.x * GetPrefReal(152) / 25.4; c.y := c.y * GetPrefReal(152) / 25.4; END;

Version

Availability: from Vectorworks 2014

Category

  • Graphic Calculation