iText 8.0.5 API
iText.Kernel.Colors.DeviceGray Class Reference

Color space to specify shades of gray color. More...

Inheritance diagram for iText.Kernel.Colors.DeviceGray:
iText.Kernel.Colors.Color

Public Member Functions

  DeviceGray?? (float value)
  Creates DeviceGray color by given grayscale. More...
 
  DeviceGray ()
  Creates DeviceGray color with grayscale value initialised as zero. More...
 
- Public Member Functions inherited from iText.Kernel.Colors.Color
virtual int  GetNumberOfComponents ()
  Returns the number of color value components More...
 
virtual PdfColorSpace  GetColorSpace ()
  Returns the color space to which the color is related. More...
 
virtual float[]  GetColorValue ()
  Returns the color value of the color More...
 
virtual void  SetColorValue (float[] value)
  Sets the color value of the color More...
 
override int  GetHashCode ()
 
override bool  Equals (Object o)
  Indicates whether the color is equal to the given color. More...
 

Static Public Member Functions

static iText.Kernel.Colors.DeviceGray  MakeLighter (iText.Kernel.Colors.DeviceGray grayColor)
  Returns DeviceGray color which is lighter than given one More...
 
static iText.Kernel.Colors.DeviceGray  MakeDarker (iText.Kernel.Colors.DeviceGray grayColor)
  Returns DeviceGray color which is darker than given one More...
 
- Static Public Member Functions inherited from iText.Kernel.Colors.Color
static iText.Kernel.Colors.Color  MakeColor (PdfColorSpace colorSpace)
  Makes a Color of certain color space. More...
 
static iText.Kernel.Colors.Color  MakeColor (PdfColorSpace colorSpace, float[] colorValue)
  Makes a Color of certain color space and color value. More...
 
static DeviceRgb  ConvertCmykToRgb (DeviceCmyk cmykColor)
  Converts DeviceCmyk color to DeviceRgb color More...
 
static DeviceCmyk  ConvertRgbToCmyk (DeviceRgb rgbColor)
  Converts DeviceRgb color to DeviceCmyk color More...
 
static iText.Kernel.Colors.Color  CreateColorWithColorSpace (float[] colorValue)
  Creates a color object based on the passed through values. More...
 

Static Public Attributes

static readonly iText.Kernel.Colors.DeviceGray  WHITE = new iText.Kernel.Colors.DeviceGray(1f)
  Predefined white DeviceGray color. More...
 
static readonly iText.Kernel.Colors.DeviceGray  GRAY = new iText.Kernel.Colors.DeviceGray(.5f)
  Predefined gray DeviceGray color. More...
 
static readonly iText.Kernel.Colors.DeviceGray  BLACK = new iText.Kernel.Colors.DeviceGray()
  Predefined black DeviceGray color. More...
 

Additional Inherited Members

- Package Functions inherited from iText.Kernel.Colors.Color
  Color (PdfColorSpace colorSpace, float[] colorValue)
  Creates a Color of certain color space and color value. More...
 
- Package Attributes inherited from iText.Kernel.Colors.Color
PdfColorSpace  colorSpace
  The color space of the color More...
 
float[]  colorValue
  The color value of the color More...
 

Detailed Description

Color space to specify shades of gray color.

Constructor & Destructor Documentation

◆ DeviceGray()

iText.Kernel.Colors.DeviceGray.DeviceGray ( )
inline

Creates DeviceGray color with grayscale value initialised as zero.

Member Function Documentation

◆ DeviceGray??()

iText.Kernel.Colors.DeviceGray.DeviceGray?? ( float  value )
inline

Creates DeviceGray color by given grayscale.

Creates DeviceGray color by given grayscale. The grayscale is considered to be in [0, 1] interval, if not, the grayscale will be considered as 1 (when grayscale's value is bigger than 1) or 0 (when grayscale's value is less than 0).

Parameters
value the grayscale value

◆ MakeDarker()

static iText.Kernel.Colors.DeviceGray iText.Kernel.Colors.DeviceGray.MakeDarker ( iText.Kernel.Colors.DeviceGray  grayColor )
inlinestatic

Returns DeviceGray color which is darker than given one

Parameters
grayColor the DeviceGray color to be made darker
Returns
darker color

◆ MakeLighter()

static iText.Kernel.Colors.DeviceGray iText.Kernel.Colors.DeviceGray.MakeLighter ( iText.Kernel.Colors.DeviceGray  grayColor )
inlinestatic

Returns DeviceGray color which is lighter than given one

Parameters
grayColor the DeviceGray color to be made lighter
Returns
lighter color

Member Data Documentation

◆ BLACK

readonly iText.Kernel.Colors.DeviceGray iText.Kernel.Colors.DeviceGray.BLACK = new iText.Kernel.Colors.DeviceGray()
static

Predefined black DeviceGray color.

◆ GRAY

readonly iText.Kernel.Colors.DeviceGray iText.Kernel.Colors.DeviceGray.GRAY = new iText.Kernel.Colors.DeviceGray(.5f)
static

Predefined gray DeviceGray color.

◆ WHITE

readonly iText.Kernel.Colors.DeviceGray iText.Kernel.Colors.DeviceGray.WHITE = new iText.Kernel.Colors.DeviceGray(1f)
static

Predefined white DeviceGray color.