title: Drawing a transparent shape in libGDX as an Actor?
body: <p>I'm trying to draw a simple rect on the screen in a class and using it as an actor.</p>
  
  <p>But whatever I do, it seems that there is no option to draw it transparent. Does anyone know how to do this?
  Thanks in advance!</p>
  
  <pre><code>public class AreaColorRect extends Actor {
  
      public float opacity = 0.0f;
      private Color shapeFillColor = new Color();
      public Rectangle area;
      public ShapeRenderer shapeRen;
  
      public AreaColorRect(float x, float y, float w, float h) {
          shapeRen = new ShapeRenderer();
          this.area = new Rectangle(x, y, w, h);
      }
  
  
      @Override
      public void draw(SpriteBatch batch, float parentAlpha) {
          shapeRen.begin(ShapeType.Filled);
          shapeRen.setColor(new Color(shapeFillColor.r, shapeFillColor.g, shapeFillColor.b,
              0.0f));
          shapeRen.rect(area.x, area.y, area.width, area.height);
          shapeRen.end();
      }
  
      public void setShapeFillColor(float r, float g, float b) {
          this.shapeFillColor = new Color(r, g, b, 1);
      }
  
  }
  </code></pre>