Package java.awt.image

Examples of java.awt.image.ComponentColorModel.coerceData()


                                                      DataBuffer.TYPE_BYTE);
   
    harness.check(ccm.isAlphaPremultiplied(), false);
   
    // Check to ensure data is not changed needlessly
    ColorModel resultCM = ccm.coerceData(rast, false);
    harness.check(resultCM.getClass().equals(ccm.getClass()));
    harness.check(resultCM.isAlphaPremultiplied(), false);
    harness.check(ccm, resultCM);
    for (int x = 0; x < 50; x++)
      for (int y = 0; y < 50; y++)
View Full Code Here


            else
              harness.check(rast.getSampleFloat(x, y, b), (x+y));
          }
   
    // Coerce data into a premultiplied state
    resultCM = ccm.coerceData(rast, true);
   
    // Ensure we're still using the same color model!
    harness.check(resultCM.getClass().equals(ccm.getClass()));
    harness.check(resultCM.isAlphaPremultiplied(), true);
    harness.check(! (ccm == resultCM));     // object is cloned...
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.