DynamicPDF by ceTe Software

com.cete.dynamicpdf
Class RgbColor

java.lang.Object
  |
  +--com.cete.dynamicpdf.Color
        |
        +--com.cete.dynamicpdf.RgbColor
Direct Known Subclasses:
WebColor

public class RgbColor
extends Color

Class represents an RGB color.


Constructor Summary
RgbColor(byte red, byte green, byte blue)
          Initializes a new instance of the RgbColor class.
RgbColor(float red, float green, float blue)
          Initializes a new instance of the RgbColor class.
RgbColor(int red, int green, int blue)
          Initializes a new instance of the RgbColor class.
 
Method Summary
 void draw(PageWriter writer, Apply apply)
          Draws the color data to the given PageWriter object.
 boolean equals(java.lang.Object obje)
          Tests equality of colors.
 float getB()
          Gets the blue value.
 float getG()
          Gets the green value.
 float getR()
          Gets the red value.
 int hashCode()
          Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
protected  void setColor(byte red, byte green, byte blue)
          Sets the color.
protected  void setColor(float red, float green, float blue)
          Sets the color.
 
Methods inherited from class com.cete.dynamicpdf.Color
getAliceBlue, getAntiqueWhite, getAqua, getAquamarine, getAzure, getBeige, getBisque, getBlack, getBlanchedAlmond, getBlue, getBlueViolet, getBrown, getBurlyWood, getCadetBlue, getChartreuse, getChocolate, getCoral, getCornflowerBlue, getCornsilk, getCrimson, getCyan, getDarkBlue, getDarkCyan, getDarkGoldenRod, getDarkGray, getDarkGreen, getDarkKhaki, getDarkMagenta, getDarkOliveGreen, getDarkorange, getDarkOrchid, getDarkRed, getDarkSalmon, getDarkSeaGreen, getDarkSlateBlue, getDarkSlateGray, getDarkTurquoise, getDarkViolet, getDeepPink, getDeepSkyBlue, getDimGray, getDodgerBlue, getFeldspar, getFireBrick, getFloralWhite, getForestGreen, getFuchsia, getGainsboro, getGhostWhite, getGold, getGoldenRod, getGray, getGreen, getGreenYellow, getHoneyDew, getHotPink, getIndianRed, getIndigo, getIvory, getKhaki, getLavender, getLavenderBlush, getLawnGreen, getLemonChiffon, getLightBlue, getLightCoral, getLightCyan, getLightGoldenRodYellow, getLightGreen, getLightGrey, getLightPink, getLightSalmon, getLightSeaGreen, getLightSkyBlue, getLightSlateBlue, getLightSlateGray, getLightSteelBlue, getLightYellow, getLime, getLimeGreen, getLinen, getMagenta, getMaroon, getMediumAquaMarine, getMediumBlue, getMediumOrchid, getMediumPurple, getMediumSeaGreen, getMediumSlateBlue, getMediumSpringGreen, getMediumTurquoise, getMediumVioletRed, getMidnightBlue, getMintCream, getMistyRose, getMoccasin, getNavajoWhite, getNavy, getOldLace, getOlive, getOliveDrab, getOrange, getOrangeRed, getOrchid, getPaleGoldenRod, getPaleGreen, getPaleTurquoise, getPaleVioletRed, getPapayaWhip, getPeachPuff, getPeru, getPink, getPlum, getPowderBlue, getPurple, getRed, getRosyBrown, getRoyalBlue, getSaddleBrown, getSalmon, getSandyBrown, getSeaGreen, getSeaShell, getSienna, getSilver, getSkyBlue, getSlateBlue, getSlateGray, getSnow, getSpringGreen, getSteelBlue, getTan, getTeal, getThistle, getTomato, getTurquoise, getViolet, getVioletRed, getWheat, getWhite, getWhiteSmoke, getYellow, getYellowGreen
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RgbColor

public RgbColor(float red,
                float green,
                float blue)
Initializes a new instance of the RgbColor class.

Throws:
java.lang.IllegalArgumentException - RBG values must be from 0.0 to 1.0.
Parameters:
red - The red intensity.
green - The green intensity.
blue - The blue intensity.
See Also:
RgbColor

RgbColor

public RgbColor(byte red,
                byte green,
                byte blue)
Initializes a new instance of the RgbColor class.

Parameters:
red - The red intensity.
green - The green intensity.
blue - The blue intensity.
See Also:
RgbColor

RgbColor

public RgbColor(int red,
                int green,
                int blue)
Initializes a new instance of the RgbColor class.

Parameters:
red - The red intensity.
green - The green intensity.
blue - The blue intensity.
See Also:
RgbColor
Method Detail

equals

public boolean equals(java.lang.Object obje)
Tests equality of colors.

Specified by:
equals in class Color
Parameters:
obje - Object to compare to the current Color.
Returns:
true if the two colors are equal.

hashCode

public int hashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

Specified by:
hashCode in class Color
Returns:
A hash code for the current Color

draw

public void draw(PageWriter writer,
                 Apply apply)
Draws the color data to the given PageWriter object.

Specified by:
draw in class Color
Parameters:
writer - PageWriter object to receive the color data.
apply - Defines how the color is applied.

getR

public float getR()
Gets the red value.


getG

public float getG()
Gets the green value.


getB

public float getB()
Gets the blue value.


setColor

protected void setColor(float red,
                        float green,
                        float blue)
Sets the color.

Throws:
java.lang.IllegalArgumentException - RBG values must be from 0.0 to 1.0.
Parameters:
red - Red value to set.
green - Green value to set.
blue - Blue value to set.

setColor

protected void setColor(byte red,
                        byte green,
                        byte blue)
Sets the color.

Parameters:
red - Red value to set.
green - Green value to set.
blue - Blue value to set.

DynamicPDF by ceTe Software

API Reference for DynamicPDF™ for Java generated on December 20, 2005
© Copyright 2005, ceTe Software