Well, I've found a problem and made a hack to make it
work but I don't quite understand why. It now fully
renders the images, but I don't understand how either
no-one else has this problem, or what is really going
on. I just noticed that only a size of width bytes was
being copied per line, which would explain why I only
see the first quarter of a line (having 32 bytes per
pixel on my system).

Having said all that, I thought I would check the
cairo source repository and I find that
cairo-directfb-surface.c has changed quite a lot, but
in order for me to rebuild my system with a later
cairo to check that the solution exists already, it
will take me an hour or so. In the mean time I thought
I would report my findings to not to waste anyones
time.

By the way the change I made to cairo 1.4.12, was in
cairo-directfb-surface.c in function
_cairo_directfb_surface_clone_similar() where code
says .....
        if (image_src->format == CAIRO_FORMAT_A1) {
            /* A1 -> A8 */
            for (i = 0; i < height; i++) {
                for (j = src_x; j < src_x + width;
j++)
                    dst[j] = (src[j>>3] & (1 <<
(j&7))) ? 0xff : 0x00;
                dst += pitch;
                src += image_src->stride;
            }
        }
        else {
            /* A8 -> A8 */
            for (i = 0; i < height; i++) {
                direct_memcpy( dst+src_x, src+src_x,
sizeof(*dst)*width );
                dst += pitch;
                src += image_src->stride;
            }
        }

where I changed the line direct_memcpy( dst+src_x,
src+src_x, sizeof(*dst)*width ); to direct_memcpy(
dst+src_x, src+src_x, (sizeof(*dst)*width)*4 ); as
*dst is an unsigned char and therefore a size of 1 x
by width (in pixels).

Rachel



      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Inbox. http://uk.docs.yahoo.com/nowyoucan.html

_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to