artifacts when rendering both sides of a transparent object with three.js

Self-transparency is particularly difficult in WebGL and three.js. You just have to really understand the issues, and then adapt your code to achieve the effect you want. You can achieve the look of a double-sided, transparent sphere in three.js, with a trick: You need to render two transparent spheres — one with material.side = THREE.BackSide, … Read more

Transparent Overlapping Circular Progress Bars (Custom Control)

I’m going to give you just a couple of suggestions on how to proceed. Start off with this bare-bones transparent control (TransparentPanel). This class is derived from Panel. That’s the first choice to make: is Panel the right control to inherit from/extend for this task? Maybe it is, maybe not. For example, a Panel is … Read more

Transparent images with C# WinForms

I was in a similar situation a couple of days ago. You can create a transparent control to host your image. using System; using System.Windows.Forms; using System.Drawing; public class TransparentControl : Control { private readonly Timer refresher; private Image _image; public TransparentControl() { SetStyle(ControlStyles.SupportsTransparentBackColor, true); BackColor = Color.Transparent; refresher = new Timer(); refresher.Tick += TimerOnTick; … Read more

How to create a semi transparent window in WPF that allows mouse events to pass through

I’ve had similar problem and found a solution: public static class WindowsServices { const int WS_EX_TRANSPARENT = 0x00000020; const int GWL_EXSTYLE = (-20); [DllImport(“user32.dll”)] static extern int GetWindowLong(IntPtr hwnd, int index); [DllImport(“user32.dll”)] static extern int SetWindowLong(IntPtr hwnd, int index, int newStyle); public static void SetWindowExTransparent(IntPtr hwnd) { var extendedStyle = GetWindowLong(hwnd, GWL_EXSTYLE); SetWindowLong(hwnd, GWL_EXSTYLE, extendedStyle … Read more

How to create Splash screen with transparent background in JavaFX

Try this JavaFX splash sample created for the Stackoverflow question: Designing a splash screen (java). And a follow up sample which also provides application initialization progress feedback. JavaFX does offer the Preloader interface for smooth transfer from splash to application, but the above samples don’t make use of it. The splash samples above also don’t … Read more

Merging two images

Just create a new BufferedImage with transparency, then paint the other two images (with full or semi-transparency) on it. This is how it will look like: Sample code (images are called ‘image.png’ and ‘overlay.png’): File path = … // base path of the images // load source images BufferedImage image = ImageIO.read(new File(path, “image.png”)); BufferedImage … Read more

Transparency for windows forms textbox

You need to try out something like this. Add a new user control , say CustomTextBox and change public partial class CustomTextBox : UserControl to public partial class CustomTextBox : TextBox You will then get the following error saying that the ‘AutoScaleMode’ is not defined. Delete the following line in the Designer.cs class. this.AutoScaleMode = … Read more

Transparent background in a Tkinter window

It is possible, but it’s OS-dependent. This will work in Windows: import Tkinter as tk # Python 2 import tkinter as tk # Python 3 root = tk.Tk() # The image must be stored to Tk or it will be garbage collected. root.image = tk.PhotoImage(file=”startup.gif”) label = tk.Label(root, image=root.image, bg=’white’) root.overrideredirect(True) root.geometry(“+250+250”) root.lift() root.wm_attributes(“-topmost”, True) … Read more

Drop shadow for PNG image in CSS

Yes, it is possible using filter: dropShadow(x y blur? spread? color?), either in CSS or inline: img { width: 150px; -webkit-filter: drop-shadow(5px 5px 5px #222); filter: drop-shadow(5px 5px 5px #222); } <img src=”https://cdn.freebiesupply.com/logos/large/2x/stackoverflow-com-logo-png-transparent.png”> <img src=”https://cdn.freebiesupply.com/logos/large/2x/stackoverflow-com-logo-png-transparent.png” style=”-webkit-filter: drop-shadow(5px 5px 5px #222); filter: drop-shadow(5px 5px 5px #222);”>