world.WindowImageFromWindow
Creates an image from another miniwindow
Prototype
long WindowImageFromWindow(BSTR WindowName, BSTR ImageId, BSTR SourceWindow);
Description
This uses an existing miniwindow's offscreen bitmap, to make an image that can be loaded into another miniwindow. This lets you set up offscreen windows (that you may never plan to actually show with WindowShow) as "work areas" for creating text or images, that can be loaded or blended into other windows.
WindowName - the name of an existing miniwindow.
ImageId - the image id to store its image under.
SourceWindow - the miniwindow name that is the source of the image.
For more information, see:
http://www.gammon.com.au/mushclient/mw_images.htm
Lua example
-- create another window
WindowCreate ("map2window", 0, 0, 150, 150, 4, 0, 0x000000) ) -- top left corner
-- pull in map window as "map" from mapping plugin
WindowImageFromWindow("map2window", "map", "86810b755a33169f0f1d9585")
-- draw our small map into "map2" window
WindowDrawImage ("map2window", "map", 0, 0, 0, 0, 2);
-- show smaller map
WindowShow ("map2window", true)
Return value
eNoSuchWindow - no such miniwindow (either source or destination)
eOK - completed OK
Related topic
See also
| Function | Description |
|---|---|
| WindowCreate | Creates a miniwindow |
| WindowCreateImage | Creates an image in a miniwindow |
| WindowDrawImage | Draws an image into a miniwindow |
| WindowImageInfo | Returns information about an image |
| WindowImageList | Lists all images installed into a miniwindow |
| WindowImageOp | Draws an ellipse, rectangle or round rectangle, filled with an image |
| WindowLoadImage | Loads an image into a miniwindow from a disk file |