Canvas in Gtk connected to D?

Alexander Hausmann via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 14 12:10:00 PDT 2015


Am 14.09.2015 um 19:05 schrieb Mike McKee:
> Is there a way to do a canvas in GTK3 so that I can use chart.js, and
> connect this to D? See, in something similar, a guy named Julien Wintz
> figured out that Qt's QQuickWidget acts much like the webkit Canvas
> object, and thus was able to port chart.js to that widget. This allows
> one to use Qt + QQuickWidget + D (or any Qt-supported language for that
> matter) to draw charts using Javascript, using the chart.js
> documentation. What's also fascinating about this is that it's fairly
> lightweight -- Julien's solution doesn't use Chromium (or other webkit
> implementation) to make it work. (It should be noted, however, that
> QQuickWidget uses OpenGL, however.) Likewise, it would be great if I
> could do something similar in GTK3.
> 
> See, I like D, and I'm getting somewhere with it with GTK3, but doing
> static charts like I see with chart.js is important for my use of this
> language.
> 

I'm guessing the port was so easy because the QQuickWidgets have access
to the V8 javascript engine (from Chromium  ) that is included with Qt.
As GTK doesn't have a javascript engine integrated a straightforward
port of chartjs won't work.



More information about the Digitalmars-d-learn mailing list