iText 8.0.5 API
iText.Layout.Properties.TransparentColor Class Reference

Represents a color with the specified opacity. More...

Public Member Functions

  TransparentColor (Color color)
  Creates a new TransparentColor instance of certain fully opaque color. More...
 
  TransparentColor (Color color, float opacity)
  Creates a new TransparentColor. More...
 
virtual Color  GetColor ()
  Gets the color. More...
 
virtual float  GetOpacity ()
  Gets the opacity of color. More...
 
virtual void  ApplyFillTransparency (PdfCanvas canvas)
  Sets the opacity value for non-stroking operations in the transparent imaging model. More...
 
virtual void  ApplyStrokeTransparency (PdfCanvas canvas)
  Sets the opacity value for stroking operations in the transparent imaging model. More...
 

Detailed Description

Represents a color with the specified opacity.

Constructor & Destructor Documentation

◆ TransparentColor() [1/2]

iText.Layout.Properties.TransparentColor.TransparentColor ( Color  color )
inline

Creates a new TransparentColor instance of certain fully opaque color.

Parameters
color the iText.Kernel.Colors.Color of the created TransparentColor object

◆ TransparentColor() [2/2]

iText.Layout.Properties.TransparentColor.TransparentColor ( Color  color,
float  opacity 
)
inline

Creates a new TransparentColor.

Parameters
color the iText.Kernel.Colors.Color of the created TransparentColor object
opacity a float defining the opacity of the color; a float between 0 and 1, where 1 stands for fully opaque color and 0 - for fully transparent

Member Function Documentation

◆ ApplyFillTransparency()

virtual void iText.Layout.Properties.TransparentColor.ApplyFillTransparency ( PdfCanvas  canvas )
inlinevirtual

Sets the opacity value for non-stroking operations in the transparent imaging model.

Parameters
canvas the iText.Kernel.Pdf.Canvas.PdfCanvas to be written to

◆ ApplyStrokeTransparency()

virtual void iText.Layout.Properties.TransparentColor.ApplyStrokeTransparency ( PdfCanvas  canvas )
inlinevirtual

Sets the opacity value for stroking operations in the transparent imaging model.

Parameters
canvas the iText.Kernel.Pdf.Canvas.PdfCanvas to be written to

◆ GetColor()

virtual Color iText.Layout.Properties.TransparentColor.GetColor ( )
inlinevirtual

Gets the color.

Returns
a iText.Kernel.Colors.Color

◆ GetOpacity()

virtual float iText.Layout.Properties.TransparentColor.GetOpacity ( )
inlinevirtual

Gets the opacity of color.

Returns
a float between 0 and 1, where 1 stands for fully opaque color and 0 - for fully transparent