Package jxl.format

Examples of jxl.format.RGB


    int green = reportColour.getGreen();
    int blue = reportColour.getBlue();

    workbook.setColourRGB(colour, red, green, blue);

    RGB customRGB = new RGB(red, green, blue);
    usedColours.put(colour, customRGB);
  }
View Full Code Here


    Colour[] colors = Colour.getAllColours();
    for (int i = 0; i < colors.length; i++)
    {
      Colour colour = colors[i];
      RGB customRGB = (RGB) usedColours.get(colour);

      RGB rgb = customRGB == null ? colour.getDefaultRGB() : customRGB;
      int dist = rgbDistance(awtColor, rgb);
      if (dist < minDist)
      {
        minDist = dist;
        minColour = colour;
View Full Code Here

    {
      int pos = i * 4 + 2;
      int red   = IntegerHelper.getInt(data[pos], (byte) 0);
      int green = IntegerHelper.getInt(data[pos + 1], (byte) 0);
      int blue  = IntegerHelper.getInt(data[pos + 2], (byte) 0);
      rgbColours[i] = new RGB(red, green, blue);
    }

    initialized = true;
  }
View Full Code Here

    // Force the colours into the range 0-255
    r = setValueRange(r, 0, 0xff);
    g = setValueRange(g, 0, 0xff);
    b = setValueRange(b, 0, 0xff);

    rgbColours[pos] = new RGB(r, g, b);

    // Indicate that the palette has been modified
    dirty = true;
  }
View Full Code Here

TOP

Related Classes of jxl.format.RGB

Copyright © 2018 www.massapicom. 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.