com.itextpdf.text
Class BaseColor

java.lang.Object
  extended by com.itextpdf.text.BaseColor
Direct Known Subclasses:
ExtendedColor

public class BaseColor
extends Object

Author:
psoares

Field Summary
static BaseColor BLACK
           
static BaseColor BLUE
           
static BaseColor CYAN
           
static BaseColor DARK_GRAY
           
static BaseColor GRAY
           
static BaseColor GREEN
           
static BaseColor LIGHT_GRAY
           
static BaseColor MAGENTA
           
static BaseColor ORANGE
           
static BaseColor PINK
           
static BaseColor RED
           
static BaseColor WHITE
           
static BaseColor YELLOW
           
 
Constructor Summary
BaseColor(float red, float green, float blue)
          Construct a BaseColor with float values.
BaseColor(float red, float green, float blue, float alpha)
          Construct a BaseColor with float values.
BaseColor(int argb)
          Construct a BaseColor by setting the combined value.
BaseColor(int red, int green, int blue)
           
BaseColor(int red, int green, int blue, int alpha)
          Construct a new BaseColor.
 
Method Summary
 BaseColor brighter()
          Make this BaseColor brighter.
 BaseColor darker()
          Make this color darker.
 boolean equals(Object obj)
           
 int getAlpha()
           
 int getBlue()
           
 int getGreen()
           
 int getRed()
           
 int getRGB()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

WHITE

public static final BaseColor WHITE

LIGHT_GRAY

public static final BaseColor LIGHT_GRAY

GRAY

public static final BaseColor GRAY

DARK_GRAY

public static final BaseColor DARK_GRAY

BLACK

public static final BaseColor BLACK

RED

public static final BaseColor RED

PINK

public static final BaseColor PINK

ORANGE

public static final BaseColor ORANGE

YELLOW

public static final BaseColor YELLOW

GREEN

public static final BaseColor GREEN

MAGENTA

public static final BaseColor MAGENTA

CYAN

public static final BaseColor CYAN

BLUE

public static final BaseColor BLUE
Constructor Detail

BaseColor

public BaseColor(int red,
                 int green,
                 int blue,
                 int alpha)
Construct a new BaseColor.

Parameters:
red - the value for the red gamma
green - the value for the green gamma
blue - the value for the blue gamma
alpha - the value for the alpha gamma

BaseColor

public BaseColor(int red,
                 int green,
                 int blue)
Parameters:
red -
green -
blue -

BaseColor

public BaseColor(float red,
                 float green,
                 float blue,
                 float alpha)
Construct a BaseColor with float values.

Parameters:
red -
green -
blue -
alpha -

BaseColor

public BaseColor(float red,
                 float green,
                 float blue)
Construct a BaseColor with float values.

Parameters:
red -
green -
blue -

BaseColor

public BaseColor(int argb)
Construct a BaseColor by setting the combined value.

Parameters:
argb -
Method Detail

getRGB

public int getRGB()
Returns:
the combined color value

getRed

public int getRed()
Returns:
the value for red

getGreen

public int getGreen()
Returns:
the value for green

getBlue

public int getBlue()
Returns:
the value for blue

getAlpha

public int getAlpha()
Returns:
the value for the alpha channel

brighter

public BaseColor brighter()
Make this BaseColor brighter. Factor used is 0.7.

Returns:
the new BaseColor

darker

public BaseColor darker()
Make this color darker. Factor used is 0.7

Returns:
the new BaseColor

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.