How can you draw semi-transparent primitives such as filled polygons to a Drawable in GTK?
Its 2010, and I google isn’t finding how to put an alpha value into a colour for me. What am I missing?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
gtk.gdk.Drawable.cairo_create()and operate on the returnedgtk.gdk.CairoContext. See documentation. Cairo is a generic vector 2D library that is used in GTK+ since many versions ago; GDK drawing primitives are deprecated in its favor (though not the whole GDK).