Package com.itextpdf.layout.properties
Class BackgroundImage.Builder
- java.lang.Object
-
- com.itextpdf.layout.properties.BackgroundImage.Builder
-
- Enclosing class:
- BackgroundImage
public static class BackgroundImage.Builder extends java.lang.ObjectBackgroundImagebuilder class.
-
-
Field Summary
Fields Modifier and Type Field Description private BackgroundSizebackgroundSizeprivate BlendModeblendModeprivate BackgroundBoxclipprivate PdfXObjectimageprivate AbstractLinearGradientBuilderlinearGradientBuilderprivate BackgroundBoxoriginprivate BackgroundPositionpositionprivate BackgroundRepeatrepeat
-
Constructor Summary
Constructors Constructor Description Builder()Creates a newBackgroundImage.Builderinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BackgroundImagebuild()Builds newBackgroundImageusing set fields.BackgroundImage.BuildersetBackgroundBlendMode(BlendMode blendMode)Set the image's blend mode.BackgroundImage.BuildersetBackgroundClip(BackgroundBox clip)Sets background-clip.BackgroundImage.BuildersetBackgroundOrigin(BackgroundBox origin)Sets background-origin.BackgroundImage.BuildersetBackgroundPosition(BackgroundPosition position)Sets background-position.BackgroundImage.BuildersetBackgroundRepeat(BackgroundRepeat repeat)Sets background-repeat.BackgroundImage.BuildersetBackgroundSize(BackgroundSize backgroundSize)Set the image's backgroundSize.BackgroundImage.BuildersetImage(PdfXObject image)Sets image.BackgroundImage.BuildersetLinearGradientBuilder(AbstractLinearGradientBuilder linearGradientBuilder)Sets linearGradientBuilder.
-
-
-
Field Detail
-
image
private PdfXObject image
-
linearGradientBuilder
private AbstractLinearGradientBuilder linearGradientBuilder
-
position
private BackgroundPosition position
-
repeat
private BackgroundRepeat repeat
-
blendMode
private BlendMode blendMode
-
backgroundSize
private BackgroundSize backgroundSize
-
clip
private BackgroundBox clip
-
origin
private BackgroundBox origin
-
-
Constructor Detail
-
Builder
public Builder()
Creates a newBackgroundImage.Builderinstance.
-
-
Method Detail
-
setImage
public BackgroundImage.Builder setImage(PdfXObject image)
Sets image.Makes linearGradientBuilder null as far as we can't have them both.
- Parameters:
image-PdfXObjectto be set.- Returns:
- this
BackgroundImage.Builder.
-
setLinearGradientBuilder
public BackgroundImage.Builder setLinearGradientBuilder(AbstractLinearGradientBuilder linearGradientBuilder)
Sets linearGradientBuilder.Makes image null as far as we can't have them both. It also makes background-repeat: no-repeat.
- Parameters:
linearGradientBuilder-AbstractLinearGradientBuilderto be set.- Returns:
- this
BackgroundImage.Builder.
-
setBackgroundRepeat
public BackgroundImage.Builder setBackgroundRepeat(BackgroundRepeat repeat)
Sets background-repeat.- Parameters:
repeat-BackgroundRepeatto be set.- Returns:
- this
BackgroundImage.Builder.
-
setBackgroundPosition
public BackgroundImage.Builder setBackgroundPosition(BackgroundPosition position)
Sets background-position.- Parameters:
position-BackgroundPositionto be set.- Returns:
- this
BackgroundImage.Builder.
-
setBackgroundBlendMode
public BackgroundImage.Builder setBackgroundBlendMode(BlendMode blendMode)
Set the image's blend mode.- Parameters:
blendMode-BlendModeto be set.- Returns:
- this
BackgroundImage.Builder.
-
setBackgroundSize
public BackgroundImage.Builder setBackgroundSize(BackgroundSize backgroundSize)
Set the image's backgroundSize.- Parameters:
backgroundSize-BackgroundSizeto be set.- Returns:
- this
BackgroundImage.Builder.
-
setBackgroundClip
public BackgroundImage.Builder setBackgroundClip(BackgroundBox clip)
Sets background-clip.- Parameters:
clip-BackgroundBoxto be set.- Returns:
- this
BackgroundImage.Builder.
-
setBackgroundOrigin
public BackgroundImage.Builder setBackgroundOrigin(BackgroundBox origin)
Sets background-origin.- Parameters:
origin-BackgroundBoxto be set.- Returns:
- this
BackgroundImage.Builder.
-
build
public BackgroundImage build()
Builds newBackgroundImageusing set fields.- Returns:
- new
BackgroundImage.
-
-