opacity

Set opacity of AVPlayerLayer

﹥>﹥吖頭↗ 提交于 2020-01-25 08:40:05
问题 I have seen quite a few posts of people wanting to play videos with transparent backgrounds. That is not what I am trying to accomplish here. I am trying to set the opacity of the whole layer. Below is how I am setting the opacity of an image layer. I have tried the same approach to set opacity for the video layer but nothing happened when I attempted to fade @IBAction func imageFadeAction(_ sender: Any) { let rounded = Int(round(imageFader.value)) imageLabel.text = "\(rounded.description)%"

WinForm Control with Opacity

心不动则不痛 提交于 2020-01-23 05:46:11
问题 I have a form that has some controls on itself(btnCreateReport,pnlDarkLayer).I have a panel that fit to form(Dock = Fill) and it is on the back of all controls.when user click on the btnCreateReport button ,I call pnlDarkLayer BringToFront method and after some calculation I call SendToBack() method of the button.I want to draw a dark layer on form controls and disable all of controls on the form. Is it possible? Thanks. Maybe this code help u to understand my purpose: private void

Making a form be invisible when it first loads

杀马特。学长 韩版系。学妹 提交于 2020-01-16 06:10:09
问题 Currently, the form's opacity is 0%, so that when it loads, it should be invisible, but when the form loads, it's visible for a few seconds. Since the default opacity is set to 0% and the form's visibility is set to false before it's opacity is set back to 100%, I would think that the form should be invisible until I tell it to. public FormMain() { InitializeComponent(); this.Visible = false; this.Opacity = 1.00; } How can I make my form invisible as a default? 回答1: It's possible. You have to

Making a form be invisible when it first loads

痞子三分冷 提交于 2020-01-16 06:09:25
问题 Currently, the form's opacity is 0%, so that when it loads, it should be invisible, but when the form loads, it's visible for a few seconds. Since the default opacity is set to 0% and the form's visibility is set to false before it's opacity is set back to 100%, I would think that the form should be invisible until I tell it to. public FormMain() { InitializeComponent(); this.Visible = false; this.Opacity = 1.00; } How can I make my form invisible as a default? 回答1: It's possible. You have to

Alpha compositing wrong when rendering to QGLFrameBufferObject vs screen

白昼怎懂夜的黑 提交于 2020-01-16 03:49:26
问题 I'm having a problem when rendering even simple shapes with partial opacity to QGLFrameBufferObjects in Qt. I have reduced the problem down to this: When I render a simple quad to a QGLFrameBufferObject with color set to (1,0,0,.5), and then blit that to the screen, I get a result that is way too light a red for 50% opacity. If I draw the same quad with the same color (same code, in fact) directly to the screen, I get the correct color value. If I render the quad with opacity == 1.0, then the

JavaScript: Opacity should reduce to 0 and then become negative

*爱你&永不变心* 提交于 2020-01-14 06:06:52
问题 I have a javaScript function. JavaScript: function opacZero(object){ var presentOpacity = (object.style.opacity); object.style.opacity =presentOpacity-0.2; setTimeout( function(){opacZero(object)}, 40); } Now when I pass som eobject to this function, its opacity should reduce till 0 and go beyond 0 (as I am not clearing the timeout anywhere). But this is not happening. The opacity reduces to 0.20000000000000007 and reduces no more. But when I subtract 0.3 (or more) instead of 0.2, it is

Set opacity with javascript in IE 8?

荒凉一梦 提交于 2020-01-14 01:48:04
问题 How can I get this "opacity-fallback" to work in IE 8? I only want to use pure Javascript, no CSS or jQuery. http://jsfiddle.net/snabbdesign/LeLfB/11/ 回答1: e.filter = "alpha(opacity:" + value * 100 + ")"; needs to be e.style.filter = 'alpha(opacity=' + value*100 + ')'; notice style and the = 来源: https://stackoverflow.com/questions/8845287/set-opacity-with-javascript-in-ie-8

How to dim an image keeping transparency untouched with CSS or JS?

喜夏-厌秋 提交于 2020-01-12 07:27:22
问题 Normal approach to dimming an image suggested everywhere is to change it's opacity attribute and display something dark under it. However, my image has transparency and is on white background. So I want to keep the background under transparent parts of image white, only making darker the pixels that have color. Is this possible to do in CSS (preferably) or JS? EDIT: Sample images http://imgur.com/a/Tat9f Example image: 回答1: There is a relatively new CSS property filter which might achieve

Is the opacity and alpha the same thing for UIView [duplicate]

柔情痞子 提交于 2020-01-12 04:23:07
问题 This question already has answers here : UIView: opaque vs. alpha vs. opacity (2 answers) Closed 6 years ago . I want to use animation to change UIView's color to make it fade, however, somehow i can't access and set opacity, but i can set alpha. I wonder if alpha and opacity are the same? Search on the web and I didnt find a good answer. Thanks a lot for your help! 回答1: Actually "opacity" means "value of alpha-channel" of your UIView . When a view is fully opaque this means its alpha = 1 ,

How to change opacity of animated gif images in iOS

a 夏天 提交于 2020-01-06 15:49:08
问题 Relevant code below. I want each image to have a fade-in affect while they appear in the overall animation cycle. When running this code, the gif animation affect works, but the opacity changing code does not. Any help would be greatly appreciated. Thanks! import UIKit class View1: UIViewController { @IBOutlet weak var imageView: UIImageView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. var imagesNames = ["ALA0.jpeg