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

Class to hold background-size property. More...

Public Member Functions

  BackgroundSize ()
  Creates a new BackgroundSize instance. More...
 
virtual void  SetBackgroundSizeToValues (UnitValue width, UnitValue height)
  Clears all current properties and sets new width and height values. More...
 
virtual void  SetBackgroundSizeToContain ()
  Clears all size values and sets the "contain" property true. More...
 
virtual void  SetBackgroundSizeToCover ()
  Clears all size values and sets the "cover" property true. More...
 
virtual UnitValue  GetBackgroundWidthSize ()
  Gets the background width property of the image. More...
 
virtual UnitValue  GetBackgroundHeightSize ()
  Gets the background height property of the image. More...
 
virtual bool  IsSpecificSize ()
  Returns is size has specific property. More...
 
virtual bool  IsContain ()
  Returns value of the "contain" property. More...
 
virtual bool  IsCover ()
  Returns value of the "cover" property. More...
 

Detailed Description

Class to hold background-size property.

Constructor & Destructor Documentation

◆ BackgroundSize()

iText.Layout.Properties.BackgroundSize.BackgroundSize ( )
inline

Creates a new BackgroundSize instance.

Creates a new BackgroundSize instance. The "cover" and "contain" properties are not set.

Member Function Documentation

◆ GetBackgroundHeightSize()

virtual UnitValue iText.Layout.Properties.BackgroundSize.GetBackgroundHeightSize ( )
inlinevirtual

Gets the background height property of the image.

Returns
the UnitValue height for this image.
See also
backgroundHeightSize

◆ GetBackgroundWidthSize()

virtual UnitValue iText.Layout.Properties.BackgroundSize.GetBackgroundWidthSize ( )
inlinevirtual

Gets the background width property of the image.

Returns
the UnitValue width for this image.
See also
backgroundWidthSize

◆ IsContain()

virtual bool iText.Layout.Properties.BackgroundSize.IsContain ( )
inlinevirtual

Returns value of the "contain" property.

Returns

true if property "contain" is set to the size, otherwise false.

See also
contain

◆ IsCover()

virtual bool iText.Layout.Properties.BackgroundSize.IsCover ( )
inlinevirtual

Returns value of the "cover" property.

Returns

true if property "cover" is set to the size, otherwise false.

See also
cover

◆ IsSpecificSize()

virtual bool iText.Layout.Properties.BackgroundSize.IsSpecificSize ( )
inlinevirtual

Returns is size has specific property.

Returns

true if size set to "contain" or "cover", otherwise false.

◆ SetBackgroundSizeToContain()

virtual void iText.Layout.Properties.BackgroundSize.SetBackgroundSizeToContain ( )
inlinevirtual

Clears all size values and sets the "contain" property true.

See also
contain

◆ SetBackgroundSizeToCover()

virtual void iText.Layout.Properties.BackgroundSize.SetBackgroundSizeToCover ( )
inlinevirtual

Clears all size values and sets the "cover" property true.

See also
cover

◆ SetBackgroundSizeToValues()

virtual void iText.Layout.Properties.BackgroundSize.SetBackgroundSizeToValues ( UnitValue  width,
UnitValue  height 
)
inlinevirtual

Clears all current properties and sets new width and height values.

Clears all current properties and sets new width and height values. One of the parameters can be null. Note that in this case null property will be scaled so that it becomes proportionally equal with the non-null value. If both parameters are set to null, then the default image size will be used.

Parameters
width a UnitValue object
height a UnitValue object