ModuleSnapshot
(Engine-Level Function)
Description: | Launched module that draws a module as an image. |
Returns: | Image |
Usage: ![]() |
Script Only. |
Function Groups: | Graphics |
Related to: | |GUIBitmap | |
Format: ![]() |
ModuleSnapshot(ModToCaptureParm, ModWidth_XCoords, ModHeight_YCoords, ptrImage, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) |
Parameters: |
ModToCaptureParm |
The name of the module to draw as an image. |
ModWidth_XCoords |
Either the width of the photo or an array [L, R] where L is the left coordinate of the photo and R is the right coordinate. If this is the width, the left coordinate will be zero. |
ModHeight_YCoords |
Either the height of the photo or an array [T, B] where T is the top coordinate of the photo and B is the bottom coordinate. If this is the height, the top coordinate will be zero. |
ptrImage |
This parameter will store the image once it is returned. |
P1, P2, P3...P10 |
Arguments to pass into the module. Up to 10 are supported. |
Comments: |
This is intended to be used to draw unlinked widgets that use windows controls. It is impossible to draw on top of certain windows controls, so we cannot draw unlinked indicators over unlinked widgets. This skirts the problem by drawing the widget off-screen, taking a photo of it, then getting rid of the off-screen widget. It should then be drawn onscreen using GUIBitmap. |
Example:
If Watch(1, Wd, Ht); [ ModuleSnapshot("DrawMain", Wd, Ht, &FlatImg, Parm1, Parm2, Parm3...); ] GUIBitmap(0, BtnHt, BtnWd, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, FlatImg);
Example using coordinates:
If Watch(1, LHS, RHS, TOP, BOT); [ ModuleSnapshot("DrawMain", \System.MakeArray(LHS, RHS), \System.MakeArray(TOP, BOT), &FlatImg, Parm1, Parm2, Parm3...); ] GUIBitmap(0, 1, 1, 0, 1 - LHS, TOP + BitmapInfo(FlatImg, 1) - 1, LHS + BitmapInfo(FlatImg, 0) - 1, 1 - TOP, 1, 0, 0, 1, 0, 0, 0, 0, FlatImg);