@Override
	public void draw (Batch batch, float parentAlpha) {
		validate();

		Color color = getColor();
		batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);

		float x = getX();
		float y = getY();
		float scaleX = getScaleX();
		float scaleY = getScaleY();

		if (drawable != null) {
			if (drawable.getClass() == TextureRegionDrawable.class) {
				TextureRegion region = ((TextureRegionDrawable)drawable).getRegion();
				float rotation = getRotation();
				if (scaleX == 1 && scaleY == 1 && rotation == 0)
					batch.draw(region, x + imageX, y + imageY, imageWidth, imageHeight);
				else {
					batch.draw(region, x + imageX, y + imageY, getOriginX() - imageX, getOriginY() - imageY, imageWidth, imageHeight,
						scaleX, scaleY, rotation);
				}
			}
			else if (drawable.getClass() == SpriteDrawable.class) {
				Sprite sprite = ((SpriteDrawable)drawable).getSprite();
				float rotation = getRotation();
				if (scaleX != 1 || scaleY != 1 || rotation != 0) {
					sprite.setOrigin(getOriginX(), getOriginY());
					sprite.setRotation(rotation);
					sprite.setScale(scaleX, scaleY);
				}
				sprite.setBounds(x + imageX, y + imageY, imageWidth, imageHeight);
				sprite.draw(batch);
			}
			else {
				drawable.draw(batch, x + imageX, y + imageY, imageWidth * scaleX, imageHeight * scaleY);
			}
		}
	}