Re: Invisible GtkImage

2013-06-22 Thread אנטולי קרסנר
The code looks fine. I think the problem is that scaling images are rarely used in GUI. Usually, they scale to fixed sizes and not directly depend on a container scaling to arbitrary size. This is probably why getting the result you want is not easy. Try the canvas idea. You can probably use any

Re: Invisible GtkImage

2013-06-22 Thread Kip Warner
On Sat, 2013-06-22 at 11:33 +0300, אנטולי קרסנר wrote: The code looks fine. I think the problem is that scaling images are rarely used in GUI. Usually, they scale to fixed sizes and not directly depend on a container scaling to arbitrary size. This is probably why getting the result you want

Re: Invisible GtkImage

2013-06-22 Thread אנטולי קרסנר
I never used drawing areas, but here are my suggestions. First, does the drawing area resize? If it does, all you need to do is to change the code which draws the image to use the drawing area's dimensions, and scale the image accordingly (I don't know how to do that, but I'm sure Cairo can help.

Re: Invisible GtkImage

2013-06-22 Thread Kip Warner
On Sat, 2013-06-22 at 19:18 +0300, אנטולי קרסנר wrote: I never used drawing areas, but here are my suggestions. First, does the drawing area resize? If it does, all you need to do is to change the code which draws the image to use the drawing area's dimensions, and scale the image

Re: Invisible GtkImage

2013-06-22 Thread David Nečas
On Sat, Jun 22, 2013 at 01:09:17PM -0700, Kip Warner wrote: I can't believe resizing a widget in Gtk+ is this difficult. Frankly, I don't quite understand what you are trying to achieve since you have never posted anything runnable and your examples have never included any actual drawing code.

Re: Invisible GtkImage

2013-06-22 Thread Kip Warner
On Sun, 2013-06-23 at 00:08 +0200, David Nečas wrote: Frankly, I don't quite understand what you are trying to achieve since you have never posted anything runnable and your examples have never included any actual drawing code. Hey David. I had posted my cairo drawing code a couple posts

Re: Invisible GtkImage

2013-06-22 Thread Colomban Wendling
Le 23/06/2013 00:30, Kip Warner a écrit : On Sun, 2013-06-23 at 00:08 +0200, David Nečas wrote: [...] This might not be exactly what you need but as I noted I don't get where the problem is... Yes, your code is similar to what I had tried before with GtkImage, only you're subclassing the