mariomac / microemu

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

drawRGB - alpha blending trouble #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Application, that uses drawRGB method with processAlpha flag set to render 
one image over other one with translucency.
2. The second one image, that should be rendered with alpha usage just 
overwrites the first one without taking into account the value of pixel's 
alpha. Like the image is opaque.
3.

What is the expected output? What do you see instead?
one image over other one not just the second one (2 images blended together).

What version of the product are you using? On what operating system?
microemulator v2.0.4 (snapshot 2.0.5).
OS: Fedora 11.

Please provide any additional information below.
path to project's class:
microemu/microemu-javase-swing/src/main/java/org/microemu/device/j2se/J2SEDispla
yGraphics.java

Stays since revision 2075. See difference between 2075 and 2040 revisions. 

Original issue reported on code.google.com by mightysk...@gmail.com on 17 Jun 2010 at 9:17

GoogleCodeExporter commented 8 years ago
Please, verify whether it is fixed in 3.0.0-SNAPSHOT:
http://snapshot.microemu.org/microemulator/download/

Original comment by bar...@gmail.com on 17 Jun 2010 at 11:47

GoogleCodeExporter commented 8 years ago
Works fine. But I have a problem with media in this snapshot.
stack trace:
Exception in thread "0" java.lang.NoClassDefFoundError: 
javax/microedition/media/Player
    at 

=== cut place ===

Caused by: 
org.microemu.app.classloader.MIDletClassLoader$LoadClassByParentException: 
javax.microedition.media.Player
    at org.microemu.app.classloader.MIDletClassLoader.findClass(MIDletClassLoader.java:339)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at org.microemu.app.classloader.MIDletClassLoader.loadClass(MIDletClassLoader.java:213)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    ... 6 more

There is no media api in this snapshot. I just copied 
javax/microedition/media/**/* package to this snapshot's jar. Then 
org/microemu/midp/**/* and replaced the org.microemu.MIDletBridge class in the 
same jar. Source classes have been got from SNAPSHOT-2.0.5. After this :) the 
midlet has started to work (first view of drawRGB() method "told" me it's able 
to be more optimized).

Is it custom build without media api support?

PS! Thanks a lot for your help.

Original comment by mightysk...@gmail.com on 17 Jun 2010 at 12:42

GoogleCodeExporter commented 8 years ago
This method doesn't take into account the graphics translation 
(graphicsInstance.getTranslateX() and graphicsInstance.getTranslateY()). I just 
noticed it. Have forgotten to mention this above. It's the problem too...

Original comment by mightysk...@gmail.com on 17 Jun 2010 at 1:08

GoogleCodeExporter commented 8 years ago
To have access to the javax.microedition.media.Player you have to include 
lib/microemu-jsr-135.jar

Please file a new bug for graphicsInstance.getTranslateX() and 
graphicsInstance.getTranslateY() issue

Original comment by bar...@gmail.com on 18 Jun 2010 at 6:19

GoogleCodeExporter commented 8 years ago
Thanks for info. I made new bug report with demo example (defect #57).

Original comment by mightysk...@gmail.com on 18 Jun 2010 at 7:24

GoogleCodeExporter commented 8 years ago
Fixed in trunk, future 3.0 version

Original comment by bar...@gmail.com on 18 Jun 2010 at 7:39