CImage:Attach
The Attach method attaches the image associated with a different instance of a CImage.
bSuccess = CImage:Attach( pointer ) where |
pointer refers to an image, not a CImage object.
bSuccess is the returned success code. On success it is true, otherwise false.
Using Attach provides CImage class functionality to be used with an image owned by another class, but the CImage does not own the foreign image or make a copy of it. Use this method, for example, to work with a displayed image that is owned by an image view window, but for that purpose it is usually preferable to use the CImageView:GetImage method.
Suppose an image window exists and is Wrapped by a CImageView object named V:
|
-- create a CImage object |
|
-- return a pointer to the current displayed image |
|
-- attach the pointer p to CImage I |
|
-- fetch the value at coordinate (10,20) |