new_measurelines
The new_measurelines function is a non-class version of the CMeasureLines:new method which creates and returns a new CMeasureLines object. You must create the object before using any class methods or properties.
C = new_measurelines() Creates a default CMeasureLines object with properties initialized to default values. C = new_measurelines( Params ) Creates a CMeasureLines object with default properties updated to values in the LineParams Table, Params. C = new_measurelines( CMeasureLines_old ) |
This is a copy constructor. It creates a new CMeasureLines object initialized to the members of theCMeasureLines_old argument.
The following script creates a new CMeasureLines object, attaches an image window and an image, then draws an angle on the image after moving adjusting the passed coordinates to the nearby centroid position.
|
-- create a new CMeasureLines |
|
|
|
-- LineParams 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 point 1 |
|
-- coordinates of point 2 |
|
-- Add the line and draw it on the image |
CMeasureLines class, new, delete, LineParams Table
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.