Re: A bug or a screw up?

Hadn't been, but I just tried it. The result was that the entire da is drawn, but still in the wrong place. It's still aligned with the top of the vbox, overlays label 1 and label 2, and there's still a big gap between the bottom of the da and the top of label 3.

It looks to me like the cr being passed to the draw callback is pointing not to a new drawing area but to some underlying drawing area, but that's a guess--I don't know a thing about the innards of cairo.

Code patch was:

Fill the entire da with a black a rectangle, then overlay the black rectangle
      with a smaller red one.

Notice that that top edge of the da, the top bit of the black rectangle,
      is cut off.

  cairo_reset_clip (cr);            // <<<<<<<<<<<<<<<<<<<<<<<<<<

  GdkRGBA black  = {0.0, 0.0, 0.0, 1.0};
  gdk_cairo_set_source_rgba (cr, &black);
  cairo_rectangle (cr, 0.0, 0.0, DA_WIDTH, DA_HEIGHT);
  cairo_fill (cr);

On 05/07/14 09:30, LRN wrote:
Hash: SHA1

On 07.05.2014 17:22, Chris Moller wrote:
I just did a good-size upgrade I'd been putting off for too long that took
me from GTK 3.2 to GTK 3.10.8, and some stuff that used to work doesn't
any more:

Basically, I have a window that contains

a vbox that contans

a label another label a drawing area a third label

The problem is that the top of drawing area is lined up with the top of
the enclosing vbox, or maybe at the top of the window, rather than at the
bottom of the second label.

Is there something new I'm missing?  It didn't used to work that way.
Do you, by chance, reset cairo clipping when drawing over the drawing area?

- -- O< ascii ribbon - stop html email! -
Version: GnuPG v1.4.11 (MingW32)

gtk-list mailing list
gtk-list gnome org

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