harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor V. Stolyarov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4902) [classlib][awt] GraphicsConfiguration.getColorModel(int transparency) returns wrong ColorModel
Date Sat, 06 Oct 2007 08:34:50 GMT
[classlib][awt] GraphicsConfiguration.getColorModel(int transparency) returns wrong ColorModel
----------------------------------------------------------------------------------------------

                 Key: HARMONY-4902
                 URL: https://issues.apache.org/jira/browse/HARMONY-4902
             Project: Harmony
          Issue Type: Bug
            Reporter: Igor V. Stolyarov


GraphicsConfiguration.getColorModel(int transparency) returns wrong ColorModel

Simple reproducer:
import java.awt.*;
import java.awt.image.*;

public class CMTest{

    public static void main(String argv[]){
        GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment()
                        .getDefaultScreenDevice();
        GraphicsConfiguration gc = gd.getDefaultConfiguration();

        System.out.println("TRANSLUCENT CM: " + gc.getColorModel(Transparency.TRANSLUCENT));
        System.out.println("BITMASK CM: " + gc.getColorModel(Transparency.BITMASK));
        System.out.println("OPAQUE CM: " + gc.getColorModel());
        GraphicsConfiguration gcs[] = gd.getConfigurations();

        for(int i = 0; i < gcs.length; i++)
            System.out.println("CM: " + gcs[i].getColorModel());

        
    }

}

Output 32 bit display resolution:

java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
 System optimized over throughput (initial strategy singleparpar))

TRANSLUCENT CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=ff000000
BITMASK CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=1000000
OPAQUE CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0

Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r581507, (Oct  3 2007), Windows/ia32/msvc 1310, release build
http://harmony.apache.org
TRANSLUCENT CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff000000
BITMASK CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff000000
OPAQUE CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff000000
CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff000000
CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = 0
CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff
CM: null
CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = 0
CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff
CM: DirectColorModel: rmask = 7c00 gmask = 3e0 bmask = 1f amask = 0
CM: DirectColorModel: rmask = 7c00 gmask = 3e0 bmask = 1f amask = ff
CM: DirectColorModel: rmask = 7 gmask = 38 bmask = c0 amask = 0
CM: DirectColorModel: rmask = 7 gmask = 38 bmask = c0 amask = ff
CM: DirectColorModel: rmask = 1 gmask = 2 bmask = 4 amask = 0
CM: DirectColorModel: rmask = 1 gmask = 2 bmask = 4 amask = ff

Output 16 bit display resolution:
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
 System optimized over throughput (initial strategy singleparpar))

TRANSLUCENT CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=ff000000
BITMASK CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=1000000
OPAQUE CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0
CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0
CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0
CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0
CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0
CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0
CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0
CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0
CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0
CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0
CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0

Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r581507, (Oct  3 2007), Windows/ia32/msvc 1310, release build
http://harmony.apache.org
TRANSLUCENT CM: DirectColorModel: rmask = f800 gmask = 7e0 bmask = 1f amask = 0
BITMASK CM: DirectColorModel: rmask = f800 gmask = 7e0 bmask = 1f amask = 0
OPAQUE CM: DirectColorModel: rmask = f800 gmask = 7e0 bmask = 1f amask = 0
CM: DirectColorModel: rmask = f800 gmask = 7e0 bmask = 1f amask = 0
CM: DirectColorModel: rmask = f800 gmask = 7e0 bmask = 1f amask = ff
CM: null
CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = 0
CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff
CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = 0
CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff
CM: DirectColorModel: rmask = 7 gmask = 38 bmask = c0 amask = 0
CM: DirectColorModel: rmask = 7 gmask = 38 bmask = c0 amask = ff
CM: DirectColorModel: rmask = 1 gmask = 2 bmask = 4 amask = 0
CM: DirectColorModel: rmask = 1 gmask = 2 bmask = 4 amask = ff

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message