Re: GdkRectangle vs cairo_rectangle_int_t


Thank you very much. Completely clear now :)


On 28 Jan 2014, at 20:36, Emmanuele Bassi <ebassi gmail com> wrote:


On 28 January 2014 19:30, Juan Rafael García Blanco <juanrgar gmail com> wrote:

Just wondering, why gtk_popover_set_pointing_to() takes an argument of type cairo_rectangle_int_t and not 
of type GdkRectangle? Which one is better suited for each situation? I know one if a typedef of the other, 
but I’m curious and I can’t think of it myself. I guess cairo_rectangle_int_t makes more sense when the 
rectangle is something actually drawn, and GdkRectangle is more general.

GdkRectangle is a typedef to cairo_rectangle_int_t, so the two types
are completely identical.

GdkRectangle predates cairo_rectangle_int_t; it actually predates the
whole of libcairo. during the transition from 2.x to 3.x we considered
the idea of dropping GdkRectangle, but the churn was judged too much.

newly written API should use Cairo types — cairo_rectangle_t,
cairo_rectangle_int_t, and cairo_region_t.



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