Re: Problems with transparent background

Lawrence D'Oliveiro <[email protected]>
Newsgroups gmane.comp.lib.cairo
Organization Geek Central
Message-ID <[email protected]>
On Wed, 22 Feb 2017 19:30:13 +0100, Martin Fischer wrote:

> gboolean expose(GtkWidget *widget, GdkEventExpose *event, gpointer
> data) {
>      cairo_t *cr = gdk_cairo_create(widget->window);
> 
>      if( glob.image == NULL )
> 		CreateBackground( cairo_get_target (cr));
> 		
>      cairo_rectangle(cr, event->area.x, event->area.y, 
> event->area.width, event->area.height);
>      cairo_clip(cr);
>      cairo_set_source_surface(cr, glob.image, 0, 0);

Maybe add

 	cairo_set_operator( cr, CAIRO_OPERATOR_SOURCE );

at some point before the following paint call?

>      cairo_paint(cr);
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.