Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.WindowImageFromWindow


Name WindowImageFromWindow
Type Method
Summary 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


Note: Available in version 4.35 onwards.


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)
Returns eNoSuchWindow - no such miniwindow (either source or destination)

eOK - completed OK
Introduced in version 4.35

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

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.