Exemple #1
0
 /**
  * Establishes the specified color (RGB).
  *
  * @param value color as defined by the setrgbcolor command
  * @return true if the color changed compared to the previous setting
  */
 public boolean useColor(final Color value) {
   if (!ColorUtil.isSameColor(this.color, value)) {
     this.color = value;
     return true;
   } else {
     return false;
   }
 }
 /**
  * Creates an uncalibrated CMYK color with the given gray value.
  *
  * @param black the gray component (0 - 1)
  * @return the CMYK color
  */
 public static Color toCMYKGrayColor(float black) {
   return org.apache.xmlgraphics.java2d.color.ColorUtil.toCMYKGrayColor(black);
 }
 /**
  * Indicates whether the color is a gray value.
  *
  * @param col the color
  * @return true if it is a gray value
  */
 public static boolean isGray(Color col) {
   return org.apache.xmlgraphics.java2d.color.ColorUtil.isGray(col);
 }
 /**
  * Lightens up a color for groove, ridge, inset and outset border effects.
  *
  * @param col the color to lighten up
  * @param factor factor by which to lighten up (negative values darken the color)
  * @return the modified color
  */
 public static Color lightenColor(Color col, float factor) {
   return org.apache.xmlgraphics.java2d.color.ColorUtil.lightenColor(col, factor);
 }