[cairo] cairo porting help

Alexander Shulgin alex.shulgin at gmail.com
Tue Dec 7 23:50:58 PST 2010


On Wed, Dec 8, 2010 at 09:39, Zoltan Kovacs <giszo.k at gmail.com> wrote:
> 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);

This should be cairo_stroke(cr)


More information about the cairo mailing list