public void draw(Batch batch, float parentAlpha) { validate(); drawBackground(batch, parentAlpha); if (isTransform()) { applyTransform(batch, computeTransform()); if (clip) { boolean draw = background == null ? clipBegin(0, 0, getWidth(), getHeight()) : clipBegin( layout.getPadLeft(), layout.getPadBottom(), getWidth() - layout.getPadLeft() - layout.getPadRight(), getHeight() - layout.getPadBottom() - layout.getPadTop()); if (draw) { drawChildren(batch, parentAlpha); clipEnd(); } } else drawChildren(batch, parentAlpha); resetTransform(batch); } else super.draw(batch, parentAlpha); }
/** Returns {@link #getPadLeft()} plus {@link #getPadRight()}. */ public float getPadX() { return layout.getPadLeft() + layout.getPadRight(); }
public float getPadLeft() { return layout.getPadLeft(); }