Class BackgroundPosition

java.lang.Object
javafx.scene.layout.BackgroundPosition

public class BackgroundPosition extends Object
Represents the position of a BackgroundImage within the Region's drawing area.

The BackgroundImage can be positioned either from the left or right side along the horizontal axis, and from either the top or bottom side along the vertical axis. The horizontalSide and verticalSide properties define to which side the remaining properties pertain. The horizontalPosition specifies the distance of the BackgroundImage from the corresponding side of the Region, and horizontalAsPercentage indicates whether this is as a literal value or a percentage. Similar properties exist for specifying the size relative to the vertical axis.

For example, suppose I had a BackgroundPosition with a horizontalSide of Side.RIGHT, a horizontalPosition of .05, and a horizontalAsPercentage of true. In this case, the right side of the BackgroundImage will be 5% of the width of the Region from the Region's right edge.

Since:
JavaFX 8.0