Recommendation for Lua graphics package please

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Recommendation for Lua graphics package please

Dirk Laurie-2
Required abilities:

1. Can create a canvas (i.e. a rectangular area on the desktop in which
   it can draw).
2. Can scale and draw images provided in SVG format.
3. Supports dialog with a user via the keyboard.
4. Runs under a typical X windows manager (in my case, Gnome).

My favourite is usually Löve2D, but it fails item 2.

Reply | Threaded
Open this post in threaded view
|

Re: Recommendation for Lua graphics package please

Luiz Henrique de Figueiredo
> 1. Can create a canvas (i.e. a rectangular area on the desktop in which
>    it can draw).
> 2. Can scale and draw images provided in SVG format.
> 3. Supports dialog with a user via the keyboard.
> 4. Runs under a typical X windows manager (in my case, Gnome).

One hack is to generated a web page and open it with a browser...

Reply | Threaded
Open this post in threaded view
|

Re: Recommendation for Lua graphics package please

Ignacio Burgueño-2
Maybe CD? (Canvas Draw, part of IUP if I'm not mistaken)

Reply | Threaded
Open this post in threaded view
|

RE: Recommendation for Lua graphics package please

Thijs Schreijer
In reply to this post by Dirk Laurie-2

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Dirk Laurie
> Sent: vrijdag 21 augustus 2015 20:10
> To: Lua mailing list
> Subject: Recommendation for Lua graphics package please
>
> Required abilities:
>
> 1. Can create a canvas (i.e. a rectangular area on the desktop in which
>    it can draw).
> 2. Can scale and draw images provided in SVG format.
> 3. Supports dialog with a user via the keyboard.
> 4. Runs under a typical X windows manager (in my case, Gnome).
>
> My favourite is usually Löve2D, but it fails item 2.

tekUI [1] maybe? I never used it, also don't know whether it fits all your requirements...

Thijs

[1] https://luarocks.org/modules/luarocks/tekui 

Reply | Threaded
Open this post in threaded view
|

Re: Recommendation for Lua graphics package please

Dirk Laurie-2
In reply to this post by Luiz Henrique de Figueiredo
2015-08-21 21:06 GMT+02:00 Luiz Henrique de Figueiredo <[hidden email]>:
>> 1. Can create a canvas (i.e. a rectangular area on the desktop in which
>>    it can draw).
>> 2. Can scale and draw images provided in SVG format.
>> 3. Supports dialog with a user via the keyboard.
>> 4. Runs under a typical X windows manager (in my case, Gnome).
>
> One hack is to generated a web page and open it with a browser...

Aha! I forgot about just hacking it! Batch-mode inkscape and
display via os.execute! The  learning curve is almost horizontal.

Reply | Threaded
Open this post in threaded view
|

Re: Recommendation for Lua graphics package please

Rena
In reply to this post by Luiz Henrique de Figueiredo
On Fri, Aug 21, 2015 at 3:06 PM, Luiz Henrique de Figueiredo
<[hidden email]> wrote:
>> 1. Can create a canvas (i.e. a rectangular area on the desktop in which
>>    it can draw).
>> 2. Can scale and draw images provided in SVG format.
>> 3. Supports dialog with a user via the keyboard.
>> 4. Runs under a typical X windows manager (in my case, Gnome).
>
> One hack is to generated a web page and open it with a browser...
>

...and then interface to it via WebSocket for live rendering.

Too bad WebSocket is such a nightmare.

--
Sent from my Game Boy.

Reply | Threaded
Open this post in threaded view
|

Re: Recommendation for Lua graphics package please

Nagaev Boris
In reply to this post by Dirk Laurie-2
On Fri, Aug 21, 2015 at 9:09 PM, Dirk Laurie <[hidden email]> wrote:
> Required abilities:
>
> 1. Can create a canvas (i.e. a rectangular area on the desktop in which
>    it can draw).
> 2. Can scale and draw images provided in SVG format.
> 3. Supports dialog with a user via the keyboard.
> 4. Runs under a typical X windows manager (in my case, Gnome).

Maybe qtlua [1]? I never used it, but it seems to fit all the requirements.

>
> My favourite is usually Löve2D, but it fails item 2.
>

Löve2D is rendering engine [2] and Qt is GUI framework [3]. GUI
applications are integrated into windowing system (e.g. create windows
with GUI elements provided by Gnome such as buttons) whereas rendering
engine can only render something to a rectangular area. Qt supports
rendering to a rectangular area as well.

[1] https://github.com/torch/qtlua
[2] https://en.wikipedia.org/wiki/Rendering_%28computer_graphics%29
[3] https://en.wikipedia.org/wiki/Graphical_user_interface

--


Best regards,
Boris Nagaev

Reply | Threaded
Open this post in threaded view
|

Re: Recommendation for Lua graphics package please

Dirk Laurie-2
2015-08-22 11:46 GMT+02:00 Nagaev Boris <[hidden email]>:

> On Fri, Aug 21, 2015 at 9:09 PM, Dirk Laurie <[hidden email]> wrote:
>> Required abilities:
>>
>> 1. Can create a canvas (i.e. a rectangular area on the desktop in which
>>    it can draw).
>> 2. Can scale and draw images provided in SVG format.
>> 3. Supports dialog with a user via the keyboard.
>> 4. Runs under a typical X windows manager (in my case, Gnome).
>
> Maybe qtlua [1]? I never used it, but it seems to fit all the requirements.

I have used qt under Python, so the learning curve should not be
steep, but last time I tried qtlua, it would not build. I see that it
is currently
being actively maintained (last change less than a month ago) so I shall
give it another try.

> Löve2D is rendering engine [2]

Its main merits are that it has a very simple API (you supply just a few
callbacks), supports sounds too, and runs under many systems (you
can even write smartphone apps in it). For that last reason, I may well
drop the SVG requirement.