[cairo] cairo porting help
Zoltan Kovacs
giszo.k at gmail.com
Tue Dec 7 23:39:26 PST 2010
Hi.
I am trying to port the cairo library to an OS that the library does
not support by default. Both libraries (pixman & cairo) has been
compiled successfully and I am trying to test it with the following
code piece:
int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, 640);
dbprintf("stride=%d\n", stride);
cairo_surface_t* s = cairo_image_surface_create_for_data(
reinterpret_cast<unsigned char*>(m_graphicsDriver->getFrameBuffer()),
CAIRO_FORMAT_ARGB32, 640, 480, stride
);
cairo_t* cr = cairo_create(s);
cairo_set_source_rgb(cr, 1, 1, 1);
cairo_move_to(cr, 0, 0);
cairo_line_to(cr, 100, 100);
cairo_paint(cr);
The problem is that it fills the whole framebuffer with white color
instead of drawing just the line. Where should I start debugging to
catch the problem I have?
Thanks,
Zoltan
More information about the cairo
mailing list