Re: Polar drawing widget, gearwheel drawing



This will match up with your requirements:
https://code.google.com/p/bridgegl/
https://code.google.com/p/bridgegl/source/browse/trunk/application.cpp

If the above is too noisy/featureful, then look at the python versions
below, then look at the .cc/.cpp later.

For static 2d:
https://git.gnome.org/browse/pygtk-docs/tree/examples/drawingarea.py
https://git.gnome.org/browse/gtkmm/tree/demos/gtk-demo/example_drawingarea.cc
https://git.gnome.org/browse/pygtk/tree/examples/pango/pangocairo-simple.py

For animated 2d:
https://git.gnome.org/browse/cluttermm_tutorial/tree/examples/full_example/main.cc

For multilingual:
https://git.gnome.org/browse/pygtk/tree/examples/pango/utf8-demo.py

For printing:
https://git.gnome.org/browse/pygtk/tree/examples/pygtk-demo/demos/print_editor.py
https://git.gnome.org/browse/gtkmm-documentation/tree/examples/book/printing/simple/printformoperation.cc

On 06/20/2014 03:27 PM, John Coppens wrote:
On Fri, 20 Jun 2014 19:54:28 +0200
Arne Pagel <arne pagelnet de> wrote:

Point is that I don't want to spend a lot of time in this feature, so I am searching for the easiest
solution, especially since I never did some pure graphic programming like this, just a little bit 2D
plotting with get-extra and normal Widget usage.

I'm sure I'll get comments on this.

Graphics drawing in gtk is in some strange state. I used to employ gnome_canvas
for this, which is relatively easy to use, but has been declared deprecated for
quite a few years, but with no real direct alternative (geocanvas, goocanvas
and others having been candidates). 

As far as I can say, you have two alternatives:

1) if you just need a drawing, which doesn't have to scale with the
GUI, and probably would not print very well, you can use the GD library
to generate an image dynamically. GD is easy to use, and quite
powerful. It's also frequently part of distros.

2) if you want better quality, look at cairo, which is native to gtk
now, but is somewhat more difficult to use, but is vector based, and as
such capable of much better quality. Also, you can easily generate
image files, and even PDFs to print. Even though more complicated, the
quality of Cairo is worth it...

John
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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