alpha

How can I get the alpha value on an Instance (in JSFL)?

大憨熊 提交于 2019-12-13 06:44:56
问题 If I use simple Alpha color effects on an instance on the stage, how do I access it via JSFL? An instance's *.colorAlphaAmount and *.colorAlphaPercent doesn't access the above illustration's value. It's only useful for "Advanced Color" effects. It looks like fl.getDocumentDOM().setInstanceAlpha(18); can SET the alpha property, but NOT GET it. Also, this method would assume that the instance is selected in the current timeline / layer / frame, which I likely wouldn't (since I'm iterating

NSTimer creating a pulse effect in AVAudioPlayer and UIAnimation

落爺英雄遲暮 提交于 2019-12-13 06:03:48
问题 I've made a sound app with a UIVIew .png image ( mouthMeter ) whose alpha I would like to dim according to the averagePowerForChannel coming out of AVAudioPlayer . The alpha is being changed via updates from an NSTimer , meterTimer , 12 times a second (to simulate 12 fps). I also have a second NSTimer , sliderTimer which is updating the position of a UISlider once every second. The dimming seems to be occuring, however there is a second effect of the alpha pulsing to fully-on (1.0). I can

CreateJS getObjectsUnderPoint when alpha = 0

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 04:14:59
问题 I need to get all bitmaps under point in a container. The bitmaps alpha is set to 0 and this doesnt seem to work with this method. Are there any alternatives? I cant just add an event listener to the object as that is not enough in this scenario. Thanks 回答1: 1) If you just want to get the objects under a point you'd have to loop through all children of the container and call hitTest(x,y) (http://www.createjs.com/Docs/EaselJS/classes/DisplayObject.html#method_hitTest) this ignores the alpha

How to blend 2 transparency layers?

隐身守侯 提交于 2019-12-13 03:25:20
问题 For example we have 2 transparency layers: first is black (0, 0, 0, 0.75) and second is white (255, 255, 255, 0.64) . I don't know how to blend them. But I know how to blend one opaque and one transparent layers. It's look like this: https://wikimedia.org/api/rest_v1/media/math/render/svg/1e35c32f13d5eedc7ac21e9e566796dd048a31e6 回答1: Assume that the background colour is (C, 1) (RGB, A), the first layer is (A, s) and the second layer (B, t) . Applying the blending equation twice: C' = t * B +

Error thrown on changing the alpha property

℡╲_俬逩灬. 提交于 2019-12-12 20:09:53
问题 I get this error for setting the alpha property to a view java.lang.NoSuchMethodError: android.view.View.setAlpha in my code ((View) findViewById(R.id.view)).setAlpha(100); //with float value also doesn't works What might be the problem ? I do not have any compile errors just on runtime 回答1: As the documentation states, setAlpha requires API 11. You probably have your minSDK set to something below 11 and are installing/running this on a device which is below 11. That means it doesn't have

PHP script for calculating Krippendorff's Alpha

China☆狼群 提交于 2019-12-12 14:07:34
问题 I can't find any PHP script to compute Krippendorff's Alpha. I need this for a project I'm working on, but the only things that I was able to find online are either written in Python (that I know nothing of) or are for SAS/SPSS software suites. Any help is appreciated. Thanks! 回答1: PHP and Perl syntax are quite similar. Here's the Perl script from the ALPHA resource page. I am sure you know how to convert the for loops/etc in Perl to PHP. If you are unsure about the syntax, search the Perl

How do I create a template image-based and PDF-based icons for MacOS?

人盡茶涼 提交于 2019-12-12 12:28:30
问题 Summary I'd like to create a template image-based and/or PDF-based icon for a keyboard layout that would switch colors according to dark/light mode in MacOS Mojave when displayed in the menu bar. Background I've created a customized keyboard layout using Ukelele. I've based it on a native keyboard layout, allowing Ukelele to extract the icon from the original layout. I didn't touch the icon. Yet when I switch to dark mode, my layout's icon remains black, whereas in the original layout, it

Java Graphics2D - draw an image with gradient opacity

限于喜欢 提交于 2019-12-12 10:54:27
问题 Using Graphics2d , I am trying to draw a BufferedImage on top of a background image. At an arbitrary point in this image, I would like to "cut a circular hole" in the drawn image to let the background show through. I would like the hole not be a solid shape, but rather a gradient. In other words, every pixel in the BufferedImage should have an alpha/opacity proportional to its distance from the center of the hole. I am somewhat familiar with Graphics2d gradients and with AlphaComposite , but

Stripping Alpha Channel from Images

人走茶凉 提交于 2019-12-12 10:49:33
问题 I want to strip the alpha channel (transparent background) from PNGs, and then write them as JPEG images. More correctly, I'd like to make the transparent pixels white. I've tried two techniques, both of which fail in different ways: Approach 1: BufferedImage rgbCopy = new BufferedImage(inputImage.getWidth(), inputImage.getHeight(), BufferedImage.TYPE_INT_RGB); Graphics2D graphics = rgbCopy.createGraphics(); graphics.drawImage(inputImage, 0, 0, Color.WHITE, null); graphics.dispose(); return