Package com.itextpdf.layout.properties
Class BackgroundImage
java.lang.Object
com.itextpdf.layout.properties.BackgroundImage
Class to hold background-image property.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BackgroundBox
private final BackgroundBox
private final BackgroundSize
private BlendMode
private static final BlendMode
protected PdfXObject
protected AbstractLinearGradientBuilder
private final BackgroundPosition
private final BackgroundRepeat
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
BackgroundImage
(PdfXObject image, BackgroundRepeat repeat, BackgroundPosition position, BackgroundSize backgroundSize, AbstractLinearGradientBuilder linearGradientBuilder, BlendMode blendMode, BackgroundBox clip, BackgroundBox origin) Creates a newBackgroundImage
instance.BackgroundImage
(BackgroundImage backgroundImage) Creates a copy of passedBackgroundImage
instance. -
Method Summary
Modifier and TypeMethodDescriptionGets background-clip.Gets background-origin.Gets background-position.Gets the background size property.Get the image's blend mode.getForm()
Gets initial image if it is instanceofPdfFormXObject
, otherwise returns null.getImage()
Gets initial image if it is instanceofPdfImageXObject
, otherwise returns null.float
Gets initial image height.float
Gets initial image width.Gets linearGradientBuilder.Gets imageBackgroundRepeat
instance.boolean
Returns is background specified.
-
Field Details
-
DEFAULT_BLEND_MODE
-
image
-
linearGradientBuilder
-
blendMode
-
repeat
-
position
-
backgroundSize
-
backgroundClip
-
backgroundOrigin
-
-
Constructor Details
-
BackgroundImage
Creates a copy of passedBackgroundImage
instance.- Parameters:
backgroundImage
-BackgroundImage
for cloning
-
BackgroundImage
private BackgroundImage(PdfXObject image, BackgroundRepeat repeat, BackgroundPosition position, BackgroundSize backgroundSize, AbstractLinearGradientBuilder linearGradientBuilder, BlendMode blendMode, BackgroundBox clip, BackgroundBox origin) Creates a newBackgroundImage
instance.- Parameters:
image
- background-image property.PdfXObject
instance.repeat
- background-repeat property.BackgroundRepeat
instance.position
- background-position property.BackgroundPosition
instance.backgroundSize
- background-size property.BackgroundSize
instance.linearGradientBuilder
- background-image property.AbstractLinearGradientBuilder
instance.blendMode
- the image's blend mode.BlendMode
instance.clip
- background-clip property.BackgroundBox
instance.origin
- background-origin property.BackgroundBox
instance.
-
-
Method Details
-
getImage
Gets initial image if it is instanceofPdfImageXObject
, otherwise returns null.- Returns:
PdfImageXObject
-
getForm
Gets initial image if it is instanceofPdfFormXObject
, otherwise returns null.- Returns:
PdfFormXObject
-
getBackgroundPosition
Gets background-position.- Returns:
BackgroundPosition
-
getLinearGradientBuilder
Gets linearGradientBuilder.- Returns:
AbstractLinearGradientBuilder
-
isBackgroundSpecified
public boolean isBackgroundSpecified()Returns is background specified.- Returns:
true
if background is specified, otherwise false
-
getBackgroundSize
Gets the background size property.- Returns:
BackgroundSize
instance
-
getImageWidth
public float getImageWidth()Gets initial image width.- Returns:
- the initial image width
-
getImageHeight
public float getImageHeight()Gets initial image height.- Returns:
- the initial image height
-
getRepeat
Gets imageBackgroundRepeat
instance.- Returns:
- the image background repeat
-
getBlendMode
Get the image's blend mode.- Returns:
- the
BlendMode
representation of the image's blend mode
-
getBackgroundClip
Gets background-clip.- Returns:
BackgroundBox
-
getBackgroundOrigin
Gets background-origin.- Returns:
BackgroundBox
-