[cairo] New region API
sandmann at daimi.au.dk
Tue Mar 31 03:23:09 PDT 2009
Behdad Esfahbod <behdad at behdad.org> writes:
> * cairo_region_empty() should be cairo_region_is_empty()
> * cairo_region_contains_point(). I don't have better proposal but would be
> nice to somehow match it with cairo_in_*. cairo_region_in() is ugly
> though :P.
The cairo_t API has always struck me as being philosophically slightly
different from the rest of the API.
Most of the cairo objects are quite tangible - you can explain to
someone what a cairo_font_face_t or a cairo_surface_t are, but a
cairo_t is not. There is no simple way of answering the question "what
is a "cairo_t"?
In an alternate universe where cairo_t followed the same object
oriented philosophy, the naming might have been
cairo_stroke_contains() or cairo_path_stroke_contains(). I don't think
I'd like that universe, but this particular naming problem would be
simpler to solve.
Anyway, I don't have any better answer either, except that the
inconsistency doesn't bother me because I already think about the two
APIs in a different way.
More information about the cairo