示例#1
0
 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);
 }
示例#2
0
 /** Returns {@link #getPadLeft()} plus {@link #getPadRight()}. */
 public float getPadX() {
   return layout.getPadLeft() + layout.getPadRight();
 }
示例#3
0
 public float getPadLeft() {
   return layout.getPadLeft();
 }