[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebDrawingArea to Image


Le 14/07/2026 à 17:21, Olivier Cruilles a écrit :
Hello,


I would like to create an Image file from the drawing commands I use into a WebDrawingArea object, like we can do it for DrawingArea object.
It is possible to do it like that ?


Hi,

In the last commit, I added a new API in 'gb.web.gui', named 'WebForm.Call()' that allows the server application to execute any javascript on the browser client, and waits for the result using a modal event loop.

I added a 'WebDrawingArea.GetContents()' method as an example, that returns the contents of the distant WebDrawingArea canvas as a Gambas Image object. This method automatically loads the 'gb.image' and 'gb.image.io' components to do that (as the browser returns the canvas contents as a PNG image).

The API is experimental. Try it to tell me if it fits your need. I think Fabien Bodard will be interested too.

Regards,

--
Benoît Minisini.


Follow-Ups:
Re: WebDrawingArea to ImageOlivier Cruilles <olivier.cruilles@xxxxxxxx>
References:
WebDrawingArea to ImageOlivier Cruilles <olivier.cruilles@xxxxxxxx>