Re: Polar drawing widget, gearwheel drawing



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


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