CImage:Display
The Display method displays the CImage in a new CImageView. The CImageView window is created by this method. There is a parallel method in the CImageView class.
CImageView = CImage:Display()
where
CImageView is a new CImageView object attached to the window displaying the CImage.
On success, this method returns a CImageView object.
On failure, this method returns nil.
This method creates a new CImageView window and displays in it a copy of the CImage. The image in the CImage object is not the same image as in the CImageView, although they initially have identical properties; rather the CImage and the displayed image point to two different objects in memory.
After this methods returns a reference to the new CImageView, CImageView class methods can be used to manipulate the displayed image.
The following script displays a CImage in a CImageView window:
|
-- not needed if using CImage:Display() |
|
-- create a new CImage |
|
-- load the image from a file named sPath |
|
-- displays the image and returns the new CImageView |