CAIRO_FORMAT_A1 image source color
sthustfo <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAEA28T8dXnn4_9LxpuZaw0AFBgEWqQvJLUmOatEQQyx-8CvZmw@mail.gmail.com> |
Hi all, I am using cairopango library to render text on monochrome image on Ubuntu 13.10. Now before rendering text, I create a surface of type CAIRO_FORMAT_A1, create a cairo context and set the source to solid white. However, the color of the image remains black even though I have set the color source to solid white. I want to render black color text on white background. surface = cairo_image_surface_create (CAIRO_FORMAT_A1, 320, 280); cr = cairo_create (surface); cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0); cairo_paint (cr); cairo_surface_write_to_png (surface, filename); The saved PNG image always is black color. How do I achieve an image of solid white color for a monochrome image (CAIRO_FORMAT_A1)? If suppose, the surface is created using CAIRO_FORMAT_ARGB32, then everyrhing is fine. Thanks. -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo