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 s
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 wan
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.
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 accord
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.
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 a
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 subclass