All pastes #478656 Raw Edit

Untitled

public python v1 · immutable
·published 2007-05-09 09:16 UTC
rendered paste body
class MyTextView(gtk.TextView):    def __init__(self):	gtk.TextView.__init__(self)	self.connect("expose_event", self.expose)        def expose(self, widget, event):    	global supports_alpha	cr = widget.window.cairo_create()	if supports_alpha == True:		print "yeps"		cr.set_source_rgba(1.0, 1.0, 1.0, 0.0) # Transparent	else:		cr.set_source_rgb(1.0, 1.0, 1.0) # Opaque white	# Draw the background	cr.set_operator(cairo.OPERATOR_SOURCE)	cr.paint()		return False