[Xcb] Only blurred content, when i draw on pixmap

Julien Danjou julien at danjou.info
Tue Jan 26 06:53:33 PST 2010


At 1264436930 time_t, Moritz Bruder wrote:
> I only get blurred content when I draw on a pixmap and copy it on a
> window, can someone tell me why or what I am doing wrong? (When drawing
> with cairo and only with x the same behaviour appears)

For whatever your cairo drawing is bad. Or it's good but you can't see
it because, you did not clear the background of the pixmap by drawing
something, so it has garbage at starts.

Replacing your drawing code with:

    cairo_set_source_rgb(cr, 0.5, 0.5, 0.0); 
    cairo_rectangle(cr, 0, 0, 400, 300); 
    cairo_fill(cr); 
    cairo_set_source_rgb(cr, 0.5, 0.0, 0.5); 
    cairo_rectangle(cr, 30, 30, 30, 30); 
    cairo_fill(cr); 

make it works, I see 2 rectangles.
Also, your CopyArea calls are bad IMHO, if your
window is bigger than the pixmap.

Cheers,
-- 
Julien Danjou
// ᐰ <julien at danjou.info>   http://julien.danjou.info
// Life is life. Lalalolalao
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20100126/fc52cf4b/attachment.pgp 


More information about the Xcb mailing list