new_measureangles
The new_measureangles function is a non-class version of the CMeasureAngles:new method which creates and returns a new CMeasureAngles object. You must create the object before using any class methods or properties.
C = new_measureangles() Creates a default CMeasureAngles object with properties initialized to default values. C = new_measureangles( Params ) Creates a CMeasureAngles object with default properties updated to values in the AngleParams Table, Params. C = new_measureangles( CMeasureAngles_old ) |
This is a copy constructor. It creates a new CMeasureAngles object initialized to the members of theCMeasureAngles_old argument.
The following script creates a new CMeasureAngles object, attaches an image window and an image, then draws an angle on the image after updating the passed coordinates to the nearby centroid position.
|
-- create a new CMeasureAngles |
|
|
|
-- AngleParams properties to change |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- connect to an image window |
|
-- exit if no image window |
-- grab an image from the window, V |
|
--DO NOT declare I as "local" inside the block |
|
|
|
|
-- pick the image from the CImageView V |
|
-- exit if no image |
|
|
|
-- pick the only image in the window |
|
|
|
-- coordinates of the vertex |
|
-- coordinates of endpoint 1 |
|
-- coordinates of endpoint 2 |
|
-- Add the angle and draw it on the image |
CMeasureAngles class, new, delete, AngleParams Table
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.