* @return The padding-rectangle point-of-origin x coordinate.
*/
public int prOriginX() {
// Start at the content-rectangle origin.
int x = crOriginX();
final WritingMode writingMode = this.getWritingMode();
if (this.getBPAxis() == AbsoluteAxis.VERTICAL) {
// Our BP Axis is vertical
final boolean goingRight = writingMode.getIpDirectionOdd()
== AbsoluteDirection.LEFT_TO_RIGHT;
if (goingRight) {
x -= this.traitPaddingStart();
} else {
x += this.traitPaddingStart();
}
} else {
// Our BP Axis is horizontal
final boolean goingRight = writingMode.getBpDirection()
== AbsoluteDirection.LEFT_TO_RIGHT;
if (goingRight) {
x -= this.traitPaddingBefore();
} else {
x += this.traitPaddingBefore();