weimingtom / nekonme

Automatically exported from code.google.com/p/nekonme
0 stars 0 forks source link

Alpha support when drawing to BitmapData #260

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1- Create a BitmapData
2- BitmapData.draw a couple of bitmaps with alpha channel
3- With flash it works fine, in windows it produces the problem.

What is the expected output? What do you see instead?

Expected: blended output
Actual: replaced pixels without blending colors when alpha channel != 0xFF

What version of the product are you using? On what operating system?

NPM 3.4.1 - Windows 8

Please provide any additional information below.

I'm not sure about this. But, is the drawing to a BitmapData performed as a 
software rendering? If so, it would be faster and will fix this issue to use 
BitmapData as a render target.

What I am trying to achieve is to perform a masked transition as shown in 
there: 
http://blog.cballesterosvelasco.es/2012/02/transiciones-alpha-de-mascara-en-xna.
html

There is an example with the haxe class performing this:
http://pastebin.com/sN5JjvrR

Original issue reported on code.google.com by soywiz on 19 Aug 2012 at 1:32