new_labels


The new_labels function is a non-class version of the CLabels:new method which creates and returns a new CLabels object.

Syntax

C = new_labels()

bullet.gif    Creates a default CLabels object with properties initialized to default values. You must separately this to a CImageView object using Attach.

C = new_labels( CImageView_obj )

bullet.gif    Creates a CLabels object attached to the CImageView object CImageView_obj.

Remarks

If you use any constructor that does not use a CImageView object as an argument, then you must specify one using Attach method before labels can be drawn on an image.

Example

The following script attaches to an existing CImageView and adds a label to one of its images:

L = new_labels(V)

-- create a new CLabels for the CImageView V

x = 192 ; y = 390

-- target coordinate

str = "My label text"

-- label coordinate

L:Add( I, x, y str )

-- draw the label on the image

Related Topics

CLabels class, new, delete

 


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.