[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xcb
Subject:    Re: [Xcb] Only blurred content, when i draw on pixmap
From:       Julien Danjou <julien () danjou ! info>
Date:       2010-01-26 14:53:33
Message-ID: 20100126145333.GC2690 () cigue ! easter-eggs ! fr
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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@danjou.info>   http://julien.danjou.info
// Life is life. Lalalolalao

["signature.asc" (application/pgp-signature)]

_______________________________________________
Xcb mailing list
Xcb@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xcb

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic