alpha

ggplot: adjusting alpha/fill two factors cdf

拥有回忆 提交于 2019-12-07 07:33:42
问题 I'm having some issues getting my ggplot alpha to be sufficiently dark for my plot. Example code: ggplot(mtcars, aes(x=mpg, color=factor(gear), alpha=factor(carb))) + stat_ecdf() As you can see, whenever carb == 1 , it's very difficult to see the plot elements. In my real world data set, the factor for color has four levels and the alpha factor has two levels. I was hoping to have the alpha a slightly lighter shade of the color, but more visible than how it's occurring in that example). 回答1:

Blending with HTML background in WebGL

扶醉桌前 提交于 2019-12-07 05:17:19
问题 I am drawing flat colors and textures into WebGL canvas. My colors and textures have varying alpha values and I want them to be blended correctly. I want to have transparent background (they should be blended with HTML content, which is under canvas). In WebGL, I use gl.clearColor(0, 0, 0, 0); gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA); gl.enable(gl.BLEND); It works correctly, when HTML background is black. But when I set a JPG pattern as a background of , I draw black triangle (alpha

Remove alpha channel from UIImage

℡╲_俬逩灬. 提交于 2019-12-07 04:45:05
问题 I use the following method to get a decompressed uiimage from file system. However the UIImageView is colored as red when I turn on the color blended layer, even though the UIImageView is set to Opaque. The images on file system don't have alpha channel. I tried set CGContextSetAlpha(bitmapContext, 1), but still has blended layer. Anyone know how to remove alpha channel when using CGContextDrawImage? - (UIImage *)decompressedImage { CGImageRef imageRef = self.CGImage; CGRect rect = CGRectMake

Overlay two or more Bitmaps to show in Picturebox (C#)

偶尔善良 提交于 2019-12-07 03:44:46
问题 In my C# program I have a Picturebox in which i want to show a stream of video (consecutive frames). I receive raw data, that I then transform into Bitmap or Image. I can show one image at a time without a problem (to reproduce the video stream). Now my issue is that I want to merge 2 or more bitmaps (like layers) with the same size and alpha values (ARGB) and show it on the picturebox . I have read lots of websites and posts here on SO, but many use the Graphics class, and I just can't draw

kubeadm/kubectl/kube-apiserver turn on feature gate

爱⌒轻易说出口 提交于 2019-12-07 01:52:00
问题 i'm trying to test the local persistent volume in kubernetes v1.9.2. from what i gather (and i may be wrong!) i cannot use kubeadm to add these feature gates: $ sudo kubeadm version kubeadm version: &version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.2", GitCommit:"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b", GitTreeState:"clean", BuildDate:"2018-01-18T09:42:01Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"} $ kubeadm init --help ... --feature-gates string A set of key=value

Alpha blending with multiple textures leaves colored border

半世苍凉 提交于 2019-12-06 14:27:38
问题 Following problem: I have two textures and I want to combine these two into a new texture. Thus, one texture is used as background, the other will be overlaid. The overlay texture is getting initialized with glClearColor(1.0, 1.0, 1.0, 0.0). Objects are draw onto the texture, these objects do have alpha values. Now blending between the two textures leaves a white border around the objects. The border comes from the fact that the background color in the second texture is white, isn't it? How

Android 2.2 - how do i set an spinner's alpha property?

大憨熊 提交于 2019-12-06 11:10:27
I'm trying to make a spinner totally transparent. In Android 4.0 I can do this setting the alpha property to 0 in the xml layout designer. But when I work with Android 2.2 i can't use that property, Eclipse mark it as an error and tell me that i can't use it. I tried to make it transparent writting this java code: final Spinner cmbCategorias = (Spinner) findViewById(R.id.cmbCategorias); cmbCategorias.getBackground().setAlpha(0); and it works, but the text in the spinner keeps visible. Someone can tell me what can i do?? Thanks Make xml Layout like spinner_textview.xml <?xml version="1.0"

Java JLabel ignores alpha value of foreground color when rendering HTML

怎甘沉沦 提交于 2019-12-06 10:53:29
问题 When I use a JLabel with a foreground color which has an alpha value, like so: JLabel label = new JLabel( "This is non HTML text with correct alpha color" ); label.setForeground( new Color( 1.0f, 1.0f, 1.0f, 0.5f) ); the label is displayed correctly with 0.5-alpha, so 50% gray. But when I change the text to HTML (to have more control over the text rendering), like so: JLabel label = new JLabel( "<html><p>This is HTML text with incorrect alpha color</p></html>" ); label.setForeground( new

OpenGL - don't write depth if alpha

两盒软妹~` 提交于 2019-12-06 09:57:03
问题 What I'm want to do in OpenGL using C++ and GLSL: When texture has alpha (texture.a! = 1.0;) then this pixel is not written to the depth buffer. (for color buffer it is written) Write depth occurs only when a pixel texture.a == 1.0; Discarding in shader is not a solution - then this pixel is not written to color buffer. Any ideas? @UPDATE: Example: I've got some UI images rendered by OpenGL. Some of them have alpha in corners. In scene rendering I have "depth prepass" to save some pixels by