CMeasureLines:SetParams
The SetParams method changes the properties for lines drawn on an image. Line properties are initialized to reasonable values by the class. The purpose of this method is to change the properties by setting values in the LineParams table. See the Mira User's Guide for more information under the main topic Measuring Images.
bSuccess = CMeasureLines:SetParams( LineParams_table) |
where LineParams_table is a table of type LineParams containing properties to change.
On success, true is returned.
Suppose an image window exists on the Mira screen and you wish to draw a line on the image. The script below changes the drawing color and line thickness from default values. Note that your table does not need to be named Params. Also, the coordinates do not need to be explicitly defined and could be included as parameters in the call to Add.
|
-- attach an image window |
|
-- leave script if no image window |
|
|
|
-- get the top-most or only image |
|
-- leave script if no image |
|
|
|
-- create a CMeasureLines object |
|
-- setup a LineParams table |
|
-- use a comma after each "name=value" pair |
|
-- enable new marker color |
|
|
|
-- enable new line thickness |
|
|
|
|
|
-- set the new properties |
|
|
|
-- coordinates of endpoint 1 |
|
-- coordinates of endpoint 2 |
|
-- Add the measurement to the image |
CMeasureLines class, Add, LineParams table
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.