<div dir="ltr">Hi all,<div><br></div><div>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.</div>
<div><br></div><div>surface = cairo_image_surface_create (CAIRO_FORMAT_A1, 320, 280);</div><div>cr = cairo_create (surface);</div><div>cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0);</div><div>cairo_paint (cr);<br></div><div>
<br></div><div><div>cairo_surface_write_to_png (surface, filename);</div></div><div><br></div><div>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.</div>
<div><br></div><div>Thanks.</div><div><br></div><div><br></div></div>