CLabels:new


The new method creates an instance of the CLabels class. You must call new before using any class methods or properties. Note that this object can also be created using the new_labels function.

Syntax

C = CLabels:new()

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

C = CLabels:new( 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 = CLabels:new(V)

-- create a new CLabels object for 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, delete, new_labels

 


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