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

A specialized class holding configurable properties related to an iText.Layout.Element.IElement 's background. More...

Public Member Functions

  Background (Color color)
  Creates a background with a specified color. More...
 
  Background (Color color, float opacity)
  Creates a background with a specified color and opacity. More...
 
  Background (Color color, float extraLeft, float extraTop, float extraRight, float extraBottom)
  Creates a background with a specified color, and extra space that must be counted as part of the background and therefore colored. More...
 
  Background (Color color, float opacity, float extraLeft, float extraTop, float extraRight, float extraBottom)
  Creates a background with a specified color, and extra space that must be counted as part of the background and therefore colored. More...
 
  Background (Color color, float opacity, BackgroundBox clip)
  Creates a background with a specified color, opacity and clip value. More...
 
virtual Color  GetColor ()
  Gets the background's color. More...
 
virtual float  GetOpacity ()
  Gets the opacity of the background. More...
 
virtual float  GetExtraLeft ()
  Gets the extra space that must be filled to the left of the Element. More...
 
virtual float  GetExtraRight ()
  Gets the extra space that must be filled to the right of the Element. More...
 
virtual float  GetExtraTop ()
  Gets the extra space that must be filled at the top of the Element. More...
 
virtual float  GetExtraBottom ()
  Gets the extra space that must be filled at the bottom of the Element. More...
 
virtual BackgroundBox  GetBackgroundClip ()
  Gets background clip value. More...
 

Package Attributes

TransparentColor  transparentColor
 
float  extraLeft
 
float  extraRight
 
float  extraTop
 
float  extraBottom
 

Detailed Description

A specialized class holding configurable properties related to an iText.Layout.Element.IElement 's background.

A specialized class holding configurable properties related to an iText.Layout.Element.IElement 's background. This class is meant to be used as the value for the Property.BACKGROUND key in an iText.Layout.IPropertyContainer . Allows to define a background color, and positive or negative changes to the location of the edges of the background coloring.

Constructor & Destructor Documentation

◆ Background() [1/5]

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

Creates a background with a specified color.

Parameters
color the background color

◆ Background() [2/5]

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

Creates a background with a specified color and opacity.

Parameters
color the background color
opacity the opacity of the background color; a float between 0 and 1, where 1 stands for fully opaque color and 0 - for fully transparent

◆ Background() [3/5]

iText.Layout.Properties.Background.Background ( Color  color,
float  extraLeft,
float  extraTop,
float  extraRight,
float  extraBottom 
)
inline

Creates a background with a specified color, and extra space that must be counted as part of the background and therefore colored.

Creates a background with a specified color, and extra space that must be counted as part of the background and therefore colored. These values are allowed to be negative.

Parameters
color the background color
extraLeft extra coloring to the left side
extraTop extra coloring at the top
extraRight extra coloring to the right side
extraBottom extra coloring at the bottom

◆ Background() [4/5]

iText.Layout.Properties.Background.Background ( Color  color,
float  opacity,
float  extraLeft,
float  extraTop,
float  extraRight,
float  extraBottom 
)
inline

Creates a background with a specified color, and extra space that must be counted as part of the background and therefore colored.

Creates a background with a specified color, and extra space that must be counted as part of the background and therefore colored. These values are allowed to be negative.

Parameters
color the background color
opacity the opacity of the background color; a float between 0 and 1, where 1 stands for fully opaque color and 0 - for fully transparent
extraLeft extra coloring to the left side
extraTop extra coloring at the top
extraRight extra coloring to the right side
extraBottom extra coloring at the bottom

◆ Background() [5/5]

iText.Layout.Properties.Background.Background ( Color  color,
float  opacity,
BackgroundBox  clip 
)
inline

Creates a background with a specified color, opacity and clip value.

Parameters
color the background color
opacity the opacity of the background color; a float between 0 and 1, where 1 stands for fully opaque color and 0 - for fully transparent
clip the value to clip the background color

Member Function Documentation

◆ GetBackgroundClip()

virtual BackgroundBox iText.Layout.Properties.Background.GetBackgroundClip ( )
inlinevirtual

Gets background clip value.

Returns
background clip value

◆ GetColor()

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

Gets the background's color.

Returns
a iText.Kernel.Colors.Color of any supported kind

◆ GetExtraBottom()

virtual float iText.Layout.Properties.Background.GetExtraBottom ( )
inlinevirtual

Gets the extra space that must be filled at the bottom of the Element.

Returns
a float value

◆ GetExtraLeft()

virtual float iText.Layout.Properties.Background.GetExtraLeft ( )
inlinevirtual

Gets the extra space that must be filled to the left of the Element.

Returns
a float value

◆ GetExtraRight()

virtual float iText.Layout.Properties.Background.GetExtraRight ( )
inlinevirtual

Gets the extra space that must be filled to the right of the Element.

Returns
a float value

◆ GetExtraTop()

virtual float iText.Layout.Properties.Background.GetExtraTop ( )
inlinevirtual

Gets the extra space that must be filled at the top of the Element.

Returns
a float value

◆ GetOpacity()

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

Gets the opacity of the background.

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