Re: rendering-cleanup-next



On Sat, Sep 11, 2010 at 6:29 PM, Havoc Pennington <hp pobox com> wrote:
> - in many languages GtkSizeRequest::get_width() is already just
> callable as widget.get_width()
> - plain get_width() more naturally gets request, anyhow
>
Ugh, I'd always assume that widget.get_width() would give me the width
of the widget, not the width the widget thought would be ideal but had
nothing to do with reality. Also, a width getter would never return 2
values for me.
Should we maybe rename it to gtk_size_request_get_natural/minimum_width()?
Tristan?


> Something I just noticed, it looks like widgets are doing
> get_allocation and looking at allocation.x,y still because gtk_paint_*
> seems to assume that the cairo_t is not translated?
>
gtk_paint_*() does - at least in my branch - draw relative to the
passed in cairo_t. As almost all the paint functions take
x,y,width,height anyway it doesn't really matter where the origin of
the cairo_t is. You'll notice in all the "Port to draw vfunc" patches
that I removed allocation.x/y from the x/y parameters.
The original paint functions that took a GdkWindow were
window-relative so had to take into account allocation.x/y.

Benjamin


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