CMeasureAngles:SetParams
The SetParams method changes the properties for angles drawn on an image. Angle properties are initialized to reasonable values by the class. The purpose of this method is to change the properties by setting values in the AngleParams table. See the Mira User's Guide for more information under the main topic Measuring Images.
bSuccess = CMeasureAngles:SetParams( AngleParams_table) |
where AngleParams_table is a table of type AngleParams containing properties to change.
On success, true is returned.
Suppose an image window exists on the Mira screen and you wish to draw an angle 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 CMeasureAngles object |
|
-- setup an AngleParams table |
|
-- use a comma after each "name=value" pair |
|
-- enable new marker color |
|
|
|
-- enable new line thickness |
|
|
|
|
|
-- set the new properties |
|
|
|
-- initial coordinates of the vertex |
|
-- initial coordinates of endpoint 1 |
|
-- initial coordinates of endpoint 2 |
|
-- Add the measurement to the image |
CMeasureAngles class, Add, AngleParams table
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.