Package ca.eandb.jmist.framework.color

Examples of ca.eandb.jmist.framework.color.CIEXYZ.X()


   * @see ca.eandb.jmist.framework.color.ColorModel#fromRGB(double, double, double)
   */
  @Override
  public Spectrum fromRGB(double r, double g, double b) {
    CIEXYZ xyz = ColorUtil.convertRGB2XYZ(r, g, b);
    return new XYZColor(xyz.X(), xyz.Y(), xyz.Z(), null);
  }

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.color.ColorModel#fromXYZ(double, double, double)
   */
 
View Full Code Here


   * @see ca.eandb.jmist.framework.color.ColorModel#fromRGB(double, double, double)
   */
  @Override
  public Spectrum fromRGB(double r, double g, double b) {
    CIEXYZ c = ColorUtil.convertRGB2XYZ(r, g, b);
    return fromXYZ(c.X(), c.Y(), c.Z());
  }

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.color.ColorModel#fromXYZ(double, double, double)
   */
 
View Full Code Here

   * @see ca.eandb.jmist.framework.color.xyz.single.SingleXYZColor#toXYZColor()
   */
  @Override
  public XYZColor toXYZColor() {
    CIEXYZ c = ColorUtil.convertSample2XYZ(lambda.getWavelength(), value);
    return new XYZColor(c.X(), c.Y(), c.Z());
  }

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.color.xyz.single.SingleXYZColor#asSample()
   */
 
View Full Code Here

  public void fill(int x, int y, int w, int h, Color color) {
    for (int dy = 0; dy < h; dy++, y++) {
      int index = (y * width + x) * 3;
      for (int dx = 0; dx < w; dx++) {
        CIEXYZ c = color.toXYZ();
        array[index++] = c.X();
        array[index++] = c.Y();
        array[index++] = c.Z();
      }
    }
  }
View Full Code Here

   * @see ca.eandb.jmist.framework.Display#setPixel(int, int, ca.eandb.jmist.framework.color.Color)
   */
  public void setPixel(int x, int y, Color pixel) {
    int index = (y * width + x) * 3;
    CIEXYZ c = pixel.toXYZ();
    array[index++] = c.X();
    array[index++] = c.Y();
    array[index] = c.Z();
  }

  /* (non-Javadoc)
 
View Full Code Here

    for (int ry = 0; ry < h; ry++, y++) {
      int index = (y * width + x) * 3;
      for (int rx = 0; rx < w; rx++) {
        Color pixel = pixels.getPixel(rx, ry);
        CIEXYZ c = pixel.toXYZ();
        array[index++] = c.X();
        array[index++] = c.Y();
        array[index++] = c.Z();
      }
    }
  }
View Full Code Here

   * @see ca.eandb.jmist.framework.color.ColorModel#fromRGB(double, double, double)
   */
  @Override
  public Spectrum fromRGB(double r, double g, double b) {
    CIEXYZ xyz = ColorUtil.convertRGB2XYZ(r, g, b);
    return new XYZColor(xyz.X(), xyz.Y(), xyz.Z(), this);
  }

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.color.ColorModel#fromXYZ(double, double, double)
   */
 
View Full Code Here

      protected Color getPixel(double[] raster, int index) {
        return new XYZColor(raster[index], raster[index + 1], raster[index + 2], MultiXYZColorModel.this);
      }
      protected void addPixel(double[] raster, int index, Color pixel) {
        CIEXYZ xyz = pixel.toXYZ();
        raster[index] += xyz.X();
        raster[index + 1] += xyz.Y();
        raster[index + 2] += xyz.Z();
      }
      protected void setPixel(double[] raster, int index, Color pixel) {
        CIEXYZ xyz = pixel.toXYZ();
View Full Code Here

        raster[index + 1] += xyz.Y();
        raster[index + 2] += xyz.Z();
      }
      protected void setPixel(double[] raster, int index, Color pixel) {
        CIEXYZ xyz = pixel.toXYZ();
        raster[index] = xyz.X();
        raster[index + 1] = xyz.Y();
        raster[index + 2] = xyz.Z();
      }
    };
  }
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.