« Reply #4 on: 04 / August / 2022, 18:33:21 »
@reyalp
Would you consider adding the following functionality to Lua drawings.
At the moment, unless I'm missing a trick, I can't simply clear all the drawing objects from the screen, and leave them in memory, ie to be switched back on.
Say a command like this:
draw.show(0 or 1)
An alternative to reyalp's suggestion would be to implement your own 'draw_redraw' function that tested a local variable to decide whether to call the draw.redraw module function or not. If you want to erase the current drawing from the screen you can call 'draw_clear' (not draw.clear) like the draw.redraw function does in drawings.lua.
The drawings module code is in CHDK/LUALIB/drawings.lua so you could also modify your copy of this to extend it - if you make some worthwhile changes we can always merge them into the CHDK source repository.
Phil.
Logged
CHDK ports:
sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
g12 (1.00c, 1.00e, 1.00f & 1.00g)
sx130is (1.01d & 1.01f)
ixus310hs (1.00a & 1.01a)
sx40hs (1.00d, 1.00g & 1.00i)
g1x (1.00e, 1.00f & 1.00g)
g5x (1.00c, 1.01a, 1.01b)
g7x2 (1.01a, 1.01b, 1.10b)