@Override
 public Surface setAlpha(float alpha) {
   int ialpha = (int) (0xFF * MathUtil.clamp(alpha, 0, 1));
   this.tint = (ialpha << 24) | (tint & 0xFFFFFF);
   return this;
 }
Beispiel #2
0
 @Override
 protected Float updateAndNotifyIf(Float value) {
   return super.updateAndNotifyIf(MathUtil.clamp(value, 0, 1));
 }