iText 7 7.1.8 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 bool  Equals (Object o)
  Indicates whether the color is equal to the given color. More...
 
override int  GetHashCode ()
 

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 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...
 

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.