Package ca.eandb.jmist.framework.color

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


   * @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

    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

   */
  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)
   * @see ca.eandb.jmist.framework.Display#setPixels(int, int, ca.eandb.jmist.framework.Raster)
View Full Code Here

      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

        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();
        raster[index] = xyz.X();
View Full Code Here

        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.