Form’s TransparencyKey leaves ghastly colored edging [closed]

This code is a translation (with minor interpretations) of the code found here: Windows Form Transparent Background Image. Originally from the Microsoft samples code-base (at least it was, before they killed it). When a Form is rendered transparent, setting its TransparencyKey to the same Color used as the BackGroundColor and then draw a semi-transparent Bitmap … Read more

How do I make Tkinter support PNG transparency?

Here’s an example (the PNG file example.png has lots of transparency in different places): from Tkinter import Tk, Frame, Canvas import ImageTk t = Tk() t.title(“Transparency”) frame = Frame(t) frame.pack() canvas = Canvas(frame, bg=”black”, width=500, height=500) canvas.pack() photoimage = ImageTk.PhotoImage(file=”example.png”) canvas.create_image(150, 150, image=photoimage) t.mainloop() You need to make sure the image has been stored as … Read more

SVG fill color transparency / alpha?

You use an addtional attribute; fill-opacity: This attribute takes a decimal number between 0.0 and 1.0, inclusive; where 0.0 is completely transparent. For example: <rect … fill=”#044B94″ fill-opacity=”0.4″/> Additionally you have the following: stroke-opacity attribute for the stroke opacity for the entire object

Java: Filling a BufferedImage with transparent pixels

After you clear the background with the CLEAR composite, you need to set it back to SRC_OVER to draw normally again. ex: //clear g2.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR)); g2.fillRect(0,0,256,256); //reset composite g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER)); //draw g2.setPaint(Color.RED); g2.fillOval(50,50,100,100);

Transparency for Poly3DCollection plot in matplotlib

I made a slight modification to the OP code and got the transparency working. It appears that the facecolors argument of Poly3DCollection overrides the transparency argument, so the solution was to set the color in a separate call to either Poly3DCollection.set_color or Poly3DCollection.set_facecolor: from matplotlib import pyplot as plt from mpl_toolkits.mplot3d.art3d import Poly3DCollection fig = … Read more

How to make completely transparent navigation bar in iOS 7

From this answer [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; self.navigationController.navigationBar.shadowImage = [UIImage new]; self.navigationController.navigationBar.translucent = YES; self.navigationController.view.backgroundColor = [UIColor clearColor]; self.navigationController.navigationBar.backgroundColor = [UIColor clearColor]; Also, as suggested by Josh in the comments, to put the bar back to default: [self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];