[cairo] cairo porting help

Zoltan Kovacs giszo.k at gmail.com
Tue Dec 7 23:57:04 PST 2010


Grrr, looks like a really silly mistake I made. :)

Thanks for pointing it out, now everything looks fine!

On Wed, Dec 8, 2010 at 8:50 AM, Alexander Shulgin
<alex.shulgin at gmail.com> wrote:
> 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