FAQ Database Discussion Community


HTML5 Canvas alpha transparency doesn't work in firefox for curves when window is big

javascript,html5,firefox,canvas,transparency
I'm drawing a curve on an HTML5 canvas and am using alpha transparency to create a glow effect, by drawing a thicker version of the curve underneath with an alpha of less than 1, then drawing a thinner version of the curve on top (and I'm doing this with several...

Transparent background on custom Dialog

android,background,dialog,transparency
I'm trying to get a transparent backgroud on my custon Dialog, but I can't get it done on android 4.4.4. It only works on an Android 5.1. The result I'm looking for is this: http://www.americocarelli.com.br/android_5.1.png But I get this:http://www.americocarelli.com.br/android_4.4.4.png This is my custom layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/dialogo_layout_root"...

How to make Matplotlib scatterplots transparent as a group?

python,matplotlib,transparency,scatter-plot
I'm making some scatterplots using Matplotlib (python 3.4.0, matplotlib 1.4.3, running on Linux Mint 17). It's easy enough to set alpha transparency for each point individually; is there any way to set them as a group, so that two overlapping points from the same group don't change the color? Example...

Transparent RichTextBox with Graphic not showing Text

c#,winforms,graphics,transparency,richtextbox
I have the following code working, and commented out the Text being drawn onto the control as I started out using this as a graphic only control. Moving on, I have switched the control to be RichTextBox instead of Control so that I can have all the goodies that come...

CSS: revoke transparent color from parent

html,css,transparency
I've got an image background in my #wrapper div and a 33% transparent white color "overlay" in the #lightbackground div (background: rgba(255, 255, 255, 0.33);). Now I want to revoke this transparent white color in the #footer div which is placed over the #lightbackground div: The result should be something...

Make a transparent plot with cartopy

python,matplotlib,transparency,cartopy
I'd like to create a transparent map with Cartopy (which could then be used as an overlay for a web application). Have tried to play with several settings, projections, type of plots etc., but never managed to get a transparent Cartopy map. Here is a simple example of how transparency...

Game and blitted images are no transparent

image,pygame,transparency,blit
I have a problem with no transparent png images in my pygame game. I load png images and blit them to the screen. I have a dark background of game screen and white background of images. Although, the images blitted are visible with white background. I would expect images to...

css transparent body excluding images

css,transparency,opacity
I have this code body { background-color: #808080; background-image: url('/Content/img/emboss.png'); background-repeat: no-repeat; background-position: center 250px; font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 10pt; opacity: 0.8; } img { opacity: 1; } However it doesn't work. The entire site, every element has an...

How do I pre-calculate an alpha level from aggregated data?

svg,d3.js,transparency,alphablending
The svg code below plots four points, each with a different resulting level of transparency due to overlapping points. The data consists of a position for a circle and the number of circles that will be at that position. The demo data here also demonstrates that this aggregation isn't perfect...

Transparent PNG created in Imagemagick drawn as opaque in FFMPEG

ffmpeg,imagemagick,transparency
I am trying to script the creation of videos using ImageMagick to create some overlays which are then placed on top of a video. If I try to use the image created by ImageMagick directly the transparency is drawn as opaque. I have created a transparent PNG using ImageMagick draw...

Transparent background of QLabel

android,c++,qt,transparency,qss
I have an application on Qt with many labels. The background of each should be transparent, and on PC it is (don't mind the font size): But when I compile my app for android and run it I get this: Here is how I set the transparency now: label.setStyleSheet("background: rgba(255,...

Save JFrame as image with transparent background

java,image,swing,transparency
I'm sorry I know there are a lot of questions like that but I just couldn't find the solution. I tried different things but just I can't get the background transparent. Here is my test code: public class Pngs extends JPanel { public void paint(Graphics g) { Image img =...

How can I get a translucent and colorized image in Android like the new Google Play Newsstand header?

java,android,image-processing,transparency,translucency
I'm trying to get a translucent and colorized image like the new Google Play Newsstand app, but everything which I tried until this moment doesn't work perfectly. What I mean is more specified by the images below. The Google Play Newsstand header looks like this: But my code make up...

Weighted, blended order independent transparency

opengl,graphics,shader,transparency
I want to use Meshkin method described here http://jcgt.org/published/0002/02/09/paper-lowres.pdf page 5 in order to obtain a basic weighted, blended order independent transparency. I don't understand who is Ci and ai. Also, what is "Multiple render targets"....

text transparency|color gradient

ios,objective-c,iphone,transparency
I am trying to put transparency (or a color gradient) on the title of an UIButton. I don't know how do that. I have tried to simply put a clearColor on the titleColor but we only see the background color. So i hope that there is someone here who will...

Hover over image making it transparent and showing text

html,css,image,hover,transparency
Hey I'm working on a portfolio page (just using HTML and CSS) and I created a grid of images. My plan is that the one image that is hovered over gets transparent (0.2 transparency or so) and a description text appears at this field. I created following code, but this...

WP8.1 transparent gradient

windows-phone-8.1,transparency,linear-gradients
if I use the linear gradient this way in WP 8.1: <Grid Height="20"> <Grid.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Transparent" Offset="0"/> <GradientStop Color="Black" Offset="1"/> </LinearGradientBrush> </Grid.Background> </Grid> I get a picture like this: When I understand it right, this is due to a deficient in alpha value transition. For Windows XAML...

Draw transparent-to-white gradient over white in iOS

ios,transparency,drawrect,linear-gradients,cagradientlayer
I have an iOS app with text on the main screen that scrolls. I want the text to fade out at the bottom of the screen. So I make a custom view and do something like this in drawRect: CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef context = UIGraphicsGetCurrentContext(); CGFloat gradLocs[] =...

Drawing a moving line in a transparent panel in C#

c#,drawing,transparency
There seems to be a million questions out there on this, yet I can't find one that will work. So, I guess it's time for question 1,000,001. I have a custom control with a PictureBox and a Panel. The Panel is the child of PictureBox with a transparent background. This...

how to maintain transparency for JButtons (java)

java,swing,jbutton,transparency
i'm making a tank game. in my menu i want to use pictures as jbuttons, they are partly transparent and when they appear on screen the transparent parts become white. i tried using .setOpaque but this doesn't work. i can't think of any other method to get rid of the...

How to get transparent JFrame?

java,swing,jframe,transparency
When I try to run to get transparent frame it shows exception. My code is: public class NewJFrame extends javax.swing.JFrame { public NewJFrame() { initComponents(); com.sun.awt.AWTUtilities.setWindowOpacity(this, 0.05f); } Exception is: Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: The frame is decorated at java.awt.Frame.setOpacity(Frame.java:960) at java.awt.Window$1.setOpacity(Window.java:4032) at com.sun.awt.AWTUtilities.setWindowOpacity(AWTUtilities.java:174) at...

CSS - Linear gradient transparency on both side of image

css,css3,transparency,linear-gradients
tl;dr Is there any way to add transparency to images in CSS with -webkit-linear-gradient on left, and right side of the image? Long Version I have an image I want to add transparency - with pure CSS - on both side of it avoiding using any image editor like Photoshop,...

using frame.setBackground(0, 255, 0, 0) doesn't work with linux

java,linux,swing,transparency
so I have been make a JFrame background transparent by setting the background alpha to 0, however if I run the program in linux the JFrame background is white why is this? ok I found its got something to do with rendering graphics to the frame, this method is old...

Change int color opacity in java/android

java,android,int,transparency,alpha
I am trying to change the opacity of a color that I get of my theme with the next code: TypedValue typedValueDrawerSelected = new TypedValue(); getTheme().resolveAttribute(R.attr.colorPrimary, typedValueDrawerSelected, true); int colorDrawerItemSelected = typedValueDrawerSelected.data; I want that the colorDrawerItemSelected keeps the same color, buth its alpha should be 25%. I found some...

Transparent Shader in QGLWidget leads to transparent background (see through)

qt,opengl,transparency,alphablending,multisampling
I have a QGLWidget: GlWidget::GlWidget(QWidget *parent) : QGLWidget(QGLFormat(QGL::SampleBuffers), parent) For antialiasing I resently implemented the Samplebuffer. For some transparent meshes I used the GL_BLEND function: void GlWidget::initializeGL() { ... glEnable(GL_MULTISAMPLE); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); My widget also have a background painted in the painGL() function: void GlWidget::paintGL() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);...

PHP GD How to circular crop 3 square images and merge into 1 image maintaining transparency

php,png,transparency,gd
I have 2 source images and I want to: Do a circular crop of each image, with the outside of the circle transparent Merge/copy all images back onto a destination transparent image. I have tried many examples, but can't seem to maintain transparency on the final image. I'm trying to...

Semi-transparent background for div skewed only on one side

css,css3,transparency,css-shapes,skew
I want to create an html element, e.g. a div, which is styled as follows: semi-transparent background-color rounded borders on all edges left side of the div draws a straight line right side of the div draws a skewed line I'd like to create this in CSS only and wonder...

Hide part of a border in CSS?

html,css,css3,background,transparency
I have a few simple CSS classes for a panel with a header. It works great when the background is a fixed color because I have to use that color to hide the border behind the header text. However, I now want to have a background image instead of a...

What renders faster, pre-defined image alpha, or opacity?

css,performance,web,png,transparency
If I have a png image that is 127 alpha, and I have the same image with normal alpha (255) and a CSS style of opacity:0.5, which will render faster? The reason I'm asking is I want a few partially transparent clouds in a webgame, and I'm interested to know...

Pie Chart transparency, multiple Pies

c#,winforms,charts,transparency,pie-chart
I would like to stack two pie charts ontop each other. The idea here is then to make one of them smaller so you only can see a outer ring of the pie chart behind. I tried using: chartCalProgres.BackColor = Color.Transparent; chartCalProgres.ChartAreas[0].BackColor = Color.Transparent; But as you can see in...

OpenGL unwanted transparency with deferred shading

opengl,shader,transparency,blending
I'm trying to implement deferred shading using the OpenGL, I render positions and normals to the textures. When I use only 1 light source without blending everything works well, but after I turn on blending, so the other light sources could contribute, I get a transparency. Does anyone had the...

How to make Android interactive InfoWindow over Google Maps API2 Transparent

android,transparency,google-maps-android-api-2,infowindow
I implemented perfect answer of chose007 to make InfoWindow over Google Maps API2 clickable in my app. The only problem is, that I would like to make InfoWindow transparent (to make it bubble shaped). I can do it with non-interactive InfoWindow using style wrapper: gMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() { @Override public View...

Can not overlay a transparent Qlabel on a QWidget that LibVLC uses

qt,transparency,qwidget,libvlc,qlabel
I have a question to LibVLC users that I have been struggling all day but couldn't come to a solution yet, so wanted to ask you for help. I have a Qt application that uses LibVLC to play videos, video streams. As you may know, LibVLC uses Qt widgets to...

Click through a transparent image in WPF or Silverlight

c#,wpf,silverlight,transparency
I need to develop a program that consist of an image (png) with an hole in the center. Under this image there will be a frame and I want that clicking on the transparent hole of the image I can click a button inside the frame. I don't know if...

Div with transparent gap inside border

css,border,transparency,css-shapes
I've got a div of varying size that needs to have a transparent area followed by a white border as seen in this screenshot: I have no problem getting the red transparency and shape correct, but am at a loss on how to get the transparent area followed by the...

Make JLabel background transparent in a frame with background [closed]

java,swing,graphics,transparency,jlabel
I have a JLabel on my JFrame and a JFrame with a picture background. The problem is although my JLabel is opaque but it still has a grey background which is annoying. Here is my code: import java.awt.Graphics; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Image; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPasswordField;...

Working with transparency: View behind transparent view should only shine through and not overlap

ios,uiview,transparency
I'm currently working with transparency and I'd like to have the following effect: As you can see the line takes the full width of the view. There are some transparent UIViews also on this screen. The line seems to be below the transparent UIView and if it overlaps it has...

Three.js touching faces artifacts

javascript,three.js,transparency,artifacts
I've created two transparent boxes whose faces touch. This works great unless the boxes' faces touch. // inner object var mesh2 = new THREE.Mesh(geometry, material); mesh2.position.x = 0; mesh2.position.y = 0; mesh2.position.z = 0; mesh2.scale.x = 100; mesh2.scale.y = 50; mesh2.scale.z = 100; scene.add( mesh2 ); // outer object var...

Painting custom background of parent and parent children in C#

c#,transparency,paint,custom-painting
I am trying to use this tutorial so that I can have a transparent button. It works fine for the main background, but it doesn't draw over the other children. If I use BringToFront() it then doesn't have the other child's drawing where it should be. I have started to...

OpenGL transparency not working properly

opengl,transparency,alpha
I have a problem with transparency in my project. As you can see, the transparency is working fine for other objects - you can see the rhino behind leaves, BUT the problem is with the tree itself. When there are two branches and one is closer than the other, the...

Android - overlaid layout is forcing transparency on a button element

android,layout,transparency
I have my main home screen, but after it loads I want to display an overlaid wheel selector that will go away once a choice is made. Everything has gone well so far except that the submit button for the wheel selector is having some transparency forced upon it. I've...

JavaFX 3D TriangleMesh with transparency

javafx,3d,transparency,transparent,javafx-3d
I have a texture I want to use for a TriangleMesh (it's a simple cube). Some parts of the texture are transparent. When I put the texture on the mesh, it's black. Is there a possibility to change that? I would like to make it transparent. Appreciate your help, thanks...

Why is a PNG file often larger without transparency?

web,png,transparency,frontend,photoshop
Often when I am saving a PNG-24 file with transparent areas for web in Photoshop, the file size gets larger when I deselect the transparency option. On the file I was just working on, the file size with transparency was 45.28k, but without transparency it was 53.71k, which is not...

How can an iframe get its parent background color?

javascript,html,css,iframe,transparency
I have a Pardot (Salesforce) form displayed in an iframe and control over the markup and scripts on both domains. The form has a transparent background and sometimes the parent page's background photo or color does not have enough contrast with the text color of form labels. You can't read...

LinkedIn follow button not transparent

javascript,css,transparency,linkedin
I have a LinkedIn button on my website on top of a dark background, but the corners of the rounded LinkedIn button are white making it square looking. Is there anyway to make it transparent? <li class="item-3"> <script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US </script> I have tried background-color: transparent; in CSS...

Is it possible to set window transparency in codelite, for example for the output or workspace view? [solved]

linux,window,transparency,x11,codelite
Is there a fast option to hardcode this since this feature seems to e missing and how platform dependent would that be? I use xubuntu.