alpha-transparency

Semi-transparency in RStudio

二次信任 提交于 2019-12-03 11:34:07
I'm trying to create a plot with a semi-transparent confidence region around the regression line: library(car) library(ggplot2) library(effects) mod <- lm(salary~yrs.service+sex, data=Salaries) yrseff <- as.data.frame(allEffects(mod)[[1]]) ggplot(yrseff, aes(x=yrs.service, y=fit))+ geom_ribbon(aes(ymin=lower, ymax=upper), alpha=.2)+ geom_line(colour="darkgreen", size=2) I get this error message: Warning message: In grid.Call.graphics(L_polygon, x$x, x$y, index) : semi-transparency is not supported on this device: reported only once per page However, if I first open a pdf device (as in code

Is it possible to have two overlapping PictureBox controls with transparent images? [duplicate]

你。 提交于 2019-12-03 05:18:35
This question already has answers here : Transparent images with C# WinForms (6 answers) Having two overlapping PictureBox controls , I'm trying to make the transparent areas of the picture box let the controls below (in the z-order) being visible. Even after trying what Microsoft suggests , I cannot get the desired result. This is what I currently have: And this is what I want: So my question is: Any way to achieve my desired result with two PictureBox controls (or with another way) that overlap each other and let the transparent areas shine through? Update: Actually I solved it by using this

*.bmp loses transparent background if using v6 ImageList Control

自古美人都是妖i 提交于 2019-12-02 23:49:21
问题 I'm sorry, my english is not very good. I need to use semi-transparent bitmap pictures in my D7 app. So, i should use XPManifest and ImageList version6 instead of 5.8 standard one. But in this case, I faced a problev: all images loses their transparency while I load them form stream! type TForm2 = class(TForm) btn4: TButton; btn5: TButton; lst1: TbtkListView; il1: TImageList; btn1: TButton; tlb1: TToolBar; btn2: TToolButton; btn3: TToolButton; xpmnfst1: TXPManifest; procedure btn4Click(Sender

AlphaComposite.CLEAR not working

左心房为你撑大大i 提交于 2019-12-02 23:04:27
问题 I have two JPanels on a JLayeredpane. One of them displays a pdf and the overlapping one has a transparent background (I have used setOpaque(false)). Now I can add drawings to the transparent panel such that it seems I'm actually annotating the pdf. I want to have a eraser tool to erase these annotations. I tried using the following code @Override public void draw(Graphics2D g2) { g2.setPaint(Color.WHITE); g2.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR)); g2.setBackground(new

C# - Drawing top image over background image (alpha channel) - WinForm

徘徊边缘 提交于 2019-12-02 11:44:27
问题 I've got this topimage with alpha channel in it and I need to put this image over another background image, while the alpha channel from the top image stays intact obviously. Now I've seen some tutorials with Canvas, but my project doesn't seem to recognize Canvas. Anyone got an idea why I cant use Canvas or how to put those 2 images over each other? 回答1: Ok, I will try to answer: after loading the image, like this more or less, pseudocode: Bitmap bmp = new Bitmap("MyCooolSemiTransparentImage

AlphaComposite.CLEAR not working

断了今生、忘了曾经 提交于 2019-12-02 09:02:55
I have two JPanels on a JLayeredpane. One of them displays a pdf and the overlapping one has a transparent background (I have used setOpaque(false)). Now I can add drawings to the transparent panel such that it seems I'm actually annotating the pdf. I want to have a eraser tool to erase these annotations. I tried using the following code @Override public void draw(Graphics2D g2) { g2.setPaint(Color.WHITE); g2.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR)); g2.setBackground(new Color(255, 255, 255, 0)); g2.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND, BasicStroke

Animate ImageView from alpha 0 to 1

笑着哭i 提交于 2019-12-02 07:38:32
I have an imageView that I want to start as invisible. After a certain button is clicked, I want to animate the Image into view and then I want it to remain at alpha 1. How do I do that? So far no luck. If I set the alpha to 0 in xml, then I never see the image. If I don't set alpha in xml then the image is always visible, and when the button is clicked it animates from 0 to 1 alpha. Here is my animation code. AlphaAnimation animation1 = new AlphaAnimation(0.0f, 1.0f); animation1.setDuration(1000); animation1.setStartOffset(5000); animation1.setFillAfter(true); tokenBtn.startAnimation

C# - Drawing top image over background image (alpha channel) - WinForm

北战南征 提交于 2019-12-02 04:54:10
I've got this topimage with alpha channel in it and I need to put this image over another background image, while the alpha channel from the top image stays intact obviously. Now I've seen some tutorials with Canvas, but my project doesn't seem to recognize Canvas. Anyone got an idea why I cant use Canvas or how to put those 2 images over each other? Ok, I will try to answer: after loading the image, like this more or less, pseudocode: Bitmap bmp = new Bitmap("MyCooolSemiTransparentImage.png"); bmp.MakeTransparent(colorHaveToBeRenderedTransparent); colorHaveToBeRenderedTransparent is a color

Using an alpha transparent mask on a QWidget?

眉间皱痕 提交于 2019-12-02 03:41:19
问题 Is it possible to assign an alpha-transparent mask to a QWidget? I know how to set a mask using setMask but it seems it only supports black&white masks. Is it possible to make it support a true alpha channel? i.e. currently I have a PNG like this: and a widget like this: If I load my PNG in a QPixmap and set it as a mask, I get this (notice the edges): However I would like to get this (smooth edges): Any idea how to do that? Note: I'm doing some more complex drawing on the widget, which must

Transparency for specific values in matrix using Gnuplot while preserving the palette?

痴心易碎 提交于 2019-12-02 02:36:26
Here's an interesting problem: I have a 2D "matrix" of double-precision, binary data I'd like to plot using Gnuplot. This is easily done as follows: plot "foo.dat" binary array=384x384 format='%double' with image The trick is that certain "regions" of the data have a special value, say 1234567890.0. I want those elements to be fully transparent, and all other matrix entires to be fully opaque. Is there a way to set the transparency channel based on the data itself? I have looked through the relevant parts of the Gnuplot documentation ( link ), and I think I need to use the with rgbalpha style,