[cairo] cairo macros and public API
chris at cvine.freeserve.co.uk
Wed Sep 3 16:24:55 PDT 2008
On Tue, 02 Sep 2008 22:12:48 -0700
Carl Worth <cworth at cworth.org> wrote:
> On Tue, 2008-08-26 at 00:49 +0100, Chris Vine wrote:
> > If I have that part of it correct, then the cairoint.h header
> > provides a convenience CAIRO_BITSWAP8_IF_LITTLE_ENDIAN macro which
> > seems to be just what is required, but it is not listed in the
> > index of symbols in the cairo documentation. Does this mean that it
> > is for internal cairo use only and that I should not rely on it as
> > part of the public cairo API?
> That's correct.
> "cairoint.h" means "cairo internal" and is only for use by the
> implementation of cairo itself, not for users of cairo, (and it
> shouldn't be installed, etc.).
> Note the following comment at the beginning of cairoint.h:
> * These definitions are solely for use by the implementation of
> * and constitute no kind of standard. If you need any of
> * functions, please drop me a note. Either the library needs
> * functionality, or there's a way to do what you need using
> * existing published interfaces.
> cworth at cworth.org */
> That said, if the macro does what you want, please feel free to copy
> its definition into your program, (though, preferably without a CAIRO_
> Have fun with cairo!
In the end I decided to use libtiff to convert the tiff input to raw
pixel data, and that has a TIFFReverseBits() function which will operate
on a whole buffer, and I have decided to use that.
It is working quite well, although after scaling the tiff pixel data
with cairo_scale() to the pixel size of the page printing area offered
by the GtkPrintContext object passed by the GTK+ printing functions, for
some reason there is some over-scaling (diminishing) of the image, even
when setting page margins to 0, but it is without the bounds of
More information about the cairo