[cairo] Re: [cairo-commit] src/cairo-svg-surface.c
Carl Worth
cworth at cworth.org
Thu Jun 22 17:33:36 PDT 2006
On Thu, 22 Jun 2006 13:32:55 -0700 (PDT), Emmanuel Pacaud committed:
>
> SVG: dumb implementation of bitmap glyphs.
>
> Bitmap glyphs are emited as tiny svg rectangles. An improvement would be
> to calculate glyph outline from bitmap data.
> + for (x = 0, byte = row, cols = (image->width + 7) / 8; cols; byte++, cols--) {
> + unsigned char output_byte = *byte;
> + for (bit = 0; bit < 8 && x < image->width; bit++, x++) {
> + if (output_byte & 1) {
The order of the bits within a byte in CAIRO_FORMAT_A1 are
endian-dependent. So you'll want to do a CAIRO_BITSWAP8_IF_LITTLE_ENDIAN
here, (see similar code in cairo-ps-surface.c and
cairo-pdf-surface.c).
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060622/1590cd03/attachment.pgp
More information about the cairo
mailing list