public class Background extends Object
IElement's background. This class is meant to be used as the value for the
Property.BACKGROUND key in an IPropertyContainer. Allows
to define a background color, and positive or negative changes to the
location of the edges of the background coloring.| Modifier and Type | Field and Description |
|---|---|
protected float |
extraBottom |
protected float |
extraLeft |
protected float |
extraRight |
protected float |
extraTop |
protected TransparentColor |
transparentColor |
| Constructor and Description |
|---|
Background(Color color)
Creates a background with a specified color.
|
Background(Color color,
float opacity)
Creates a background with a specified color and opacity.
|
Background(Color color,
float opacity,
BackgroundBox clip)
Creates a background with a specified color, opacity and clip value.
|
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.
|
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.
|
| Modifier and Type | Method and Description |
|---|---|
BackgroundBox |
getBackgroundClip()
Gets background clip value.
|
Color |
getColor()
Gets the background's color.
|
float |
getExtraBottom()
Gets the extra space that must be filled at the bottom of the Element.
|
float |
getExtraLeft()
Gets the extra space that must be filled to the left of the Element.
|
float |
getExtraRight()
Gets the extra space that must be filled to the right of the Element.
|
float |
getExtraTop()
Gets the extra space that must be filled at the top of the Element.
|
float |
getOpacity()
Gets the opacity of the background.
|
protected TransparentColor transparentColor
protected float extraLeft
protected float extraRight
protected float extraTop
protected float extraBottom
public Background(Color color)
color - the background colorpublic Background(Color color, float opacity)
color - the background coloropacity - the opacity of the background color; a float between 0 and 1, where 1 stands for fully opaque color and 0 - for fully transparentpublic Background(Color color, float extraLeft, float extraTop, float extraRight, float extraBottom)
color - the background colorextraLeft - extra coloring to the left sideextraTop - extra coloring at the topextraRight - extra coloring to the right sideextraBottom - extra coloring at the bottompublic Background(Color color, float opacity, float extraLeft, float extraTop, float extraRight, float extraBottom)
color - the background coloropacity - the opacity of the background color; a float between 0 and 1, where 1 stands for fully opaque color and 0 - for fully transparentextraLeft - extra coloring to the left sideextraTop - extra coloring at the topextraRight - extra coloring to the right sideextraBottom - extra coloring at the bottompublic Background(Color color, float opacity, BackgroundBox clip)
color - the background coloropacity - the opacity of the background color; a float between 0 and 1, where 1 stands for fully opaque
color and 0 - for fully transparentclip - the value to clip the background colorpublic Color getColor()
Color of any supported kindpublic float getOpacity()
public float getExtraLeft()
public float getExtraRight()
public float getExtraTop()
public float getExtraBottom()
public BackgroundBox getBackgroundClip()
Copyright © 1998–2020 iText Group NV. All rights reserved.