LabelParams Table
The LabelParams table contains properties used by the CLabels class. This table is used to change properties using the class SetParams method.
The table below lists the point measurement properties and their update status. For each property in the top half of the table, there exists a corresponding update status flag in the lower half of the table. The name of the update status flag prefixes the property name with the word Set. For example, the property bCentroid has the update status flag bSetCentroid. Normally, the update status flag is set to false. But to change it using the LabelParams table, you must the the status flag to true. Create a LabelParams table containing only the properties you wish to change. Then call the class SetParams method with the LabelParams table as its parameter.
Table Member |
Default |
Definition |
Property: |
|
|
sColor |
"255,0,0" |
The color of the point. See the nRasterOp property. |
nRasterOp |
13 |
Controls the way the marker color and image color are combined for drawing. The default draw markers with a solid line of color sColor. |
nMarkerSize |
33 |
Sets the length and width of the crosshair marker, in pixels. |
nLineThk |
1 |
Sets the thickness of the marker line, in pixels, drawn on the image. |
nMatchingTol |
3 |
Sets the tolerance, in pixels, for mouse click "hits" to the point. |
nMarkerType |
2 |
Sets the marker type. |
nAlign |
6 |
Sets the alignment between the marker center and the text label. |
bUseDockingPane |
false |
Specifies whether to list point measurements in a docking pane (true) instead of a measurement window (false). |
Update Status: |
|
|
bSetColor |
false |
Enables changes to sColor. |
bSetRasterOp |
false |
Enables changes to nRasterOp. |
bSetMarkerSize |
false |
Enables changes to nMarkerSize. |
bSetLineThk |
false |
Enables changes to nLineThk. |
bSetMatchingTol |
false |
Enables changes to nMatchingTol. |
bSetMarkerType |
false |
Enables changes to nMarkerType. |
bSetAlign |
false |
Enables changes to nAlign. |
bSetUseDockingPane |
false |
Enables changes to bUseDockingPane. |
Suppose an image window exists on the Mira screen and you have a collection of object coordinates you wish to mark on the image. The script below sets the marker size, drawing color, and line thickness before drawing the label.
|
-- attach an image window |
|
-- leave script if no image window |
|
|
|
-- get the top-most or only image |
|
-- leave script if no image |
|
|
|
-- create a CLabels object |
|
-- setup an LabelParams table |
|
-- use a comma after each "name=value" pair |
|
-- enable new marker color |
|
|
|
-- enable new marker size |
|
|
|
-- enable new line thickness |
|
|
|
|
|
-- set the new properties |
|
|
|
-- coordinates and title of the label |
|
-- Add a label to the image |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.