CImageSet:Insert
The Insert method adds a CImage to the image set prior to a specified index. For example, to add an image at the beginning of the set, before all other members, insert at position 1. A reference to the existing CImage is saved into the image set; no memory is allocated for a new image.
CImageSet:Insert( CImage, index ) |
CImage is the image object to insert.
index is a number that specifies the insertion point, beginning at 1.
The CImage is inserted prior to the image set member existing at position index. This moves all the members down in the list in order to open up the new position at index. A reference to the target CImage is then saved at the new position.
Suppose a CImageSet exists with name S and that it contains 10 images. The following script inserts a CImage I at index 5:
|
-- create a CImage |
|
-- use the Open dialog to get a filename |
|
-- exit the loop after canceling the Open dialog |
|
-- load the image |
|
-- Insert the new member at position 5 |
|
|
|
-- result: Count=11 |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.