Re: Drawing Area issues ( continued, with example )

2017-10-14 Thread Eric Cashon via gtk-perl-list
Hi Dan, The graph axis can be made dynamic so that each graph is different. That way you can show different ranges side by side. I experimented a little with this by setting a couple of array values that hold the number of tick marks on each graph. It is in C. I think that I need a big

Re: Drawing Area issues ( continued, with example )

2017-10-11 Thread Eric Cashon via gtk-perl-list
Hi Torsten, This is something that I have had some trouble with at the app level. In GTK3, how drawing is done, has changed a bit between minor versions in GTK3. In order to get CSS, transparency, OpenGL and modern drawing techniques working well,,, things have changed. Here is an

Re: Drawing Area issues ( continued, with example )

2017-10-11 Thread Torsten Schönfeld
"Daniel Kasak" : > Does anyone know ... would this bug be in the bindings, or in gtk+ or cairo? If I understand correctly, this is by design. GtkDrawingArea does not have its own GdkWindow, hence all GtkDrawingAreas within a GtkWindow share the underlying GdkWindow and

Re: Drawing Area issues ( continued, with example )

2017-10-10 Thread Daniel Kasak
Ah, thankyou :) Yes, indeed, if I avoid constructing further contexts, it works. I can replace this with just calling set_source_rgba() on the 1 context in *most* cases, though I'd have to have *two* passes for the graphs, as I draw a 'highlight' line ( lighter colour ) as well as the 'regular'

Re: Drawing Area issues ( continued, with example )

2017-10-10 Thread Eric Cashon via gtk-perl-list
You might be able to just use one drawing area. Then you don't have to worry about creating and destroying drawing areas, surfaces and contexts. When you want to redraw, just "paint" the drawing area background and start drawing. This approach works well for most drawings. Test out the

Drawing Area issues ( continued, with example )

2017-10-10 Thread Daniel Kasak
Hi again everyone. I've cut down my app to a "relatively small" example which doesn't need a database connection or loads of other stuff. It's still 400+ lines ( with lots of whitespace ). I know it's asking a lot, but if someone can figure out what I'm doing wrong, I'd be very grateful ... If