[cairo] libpixman - libpixregion, libic and slim merged; cairo built with it

Carl Worth cworth at east.isi.edu
Tue Dec 9 12:01:49 PST 2003


On Dec 8, Dave Beckett wrote:
 > and did that.  So I've taken the CVS versions of libpixregion, libic
 > and slim and made a new library libpixman version 0.1.0 which
 > exports a header pixman.h (merge of pixregion.h and ic.h).

Thanks Dave!

This is a great start. Next, we just need to give everything
consistent names. So:

	PixRegion -> pixman_region_t
	PixRegionCreate -> pixman_region_create
	etc.

	IcFormat -> pixman_format_t
	IcFormatCreate -> pixman_format_create
	etc.

	IcImage -> pixman_image_t
	IcImageCreate -> pixman_image_create
	etc.

We should probably take this chance to clean up the worst warts in the
interface too. For example, PixRegion is inconsistent with respect to
box vs. rect(s). My recommendation would be:

	PixRegionBox -> pixman_rectangle_t
	PixRegionPointInRegion -> pixman_region_contains_point
	PixRegionRectIn -> pixman_region_contains_rectangle
	PixRegionNumRects+PixRegionRects -> pixman_region_to_rectangles

which can then be merged with the old IcRectangle type, (though that
will require some code changes to deal with x2,y2
vs. width,height).

Much worse is the disgusting fact that PixRegionAppend leaves an
invalid region. The call to PixRegionValidate should be absorbed into
the implementation of PixRegionAppend, and PixRegionValidate can be
removed from the interface.

Feel free to shove this all into CVS. I would recommend doing a
repository copy to preserve history, but I already botched that and
lost history when I copied all of this code from the X server. (That
is, unless someone wants to go back and recover that for us).

-Carl




More information about the cairo mailing list