@Override
    public void draw(Batch batch, float x, float y, float width, float height) {
        float[] alphas = {col1.a, col2.a, col3.a, col4.a};
        col1.a = batch.getColor().a * col1.a;
        col2.a = batch.getColor().a * col2.a;
        col3.a = batch.getColor().a * col3.a;
        col4.a = batch.getColor().a * col4.a;
        
        g.begin(ShapeRenderer.ShapeType.Filled);
        g.setProjectionMatrix(batch.getProjectionMatrix());
        g.setTransformMatrix(batch.getTransformMatrix());
        batch.end();
        Gdx.gl.glEnable(GL20.GL_BLEND);
        Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);
        g.rect(x + borderLeft, y + borderBottom, width - borderLeft - borderRight, height - borderBottom - borderTop, col1, col2, col3, col4);
        g.end();
        Gdx.gl.glDisable(GL20.GL_BLEND);
        batch.begin();
        
        col1.a = alphas[0];
        col2.a = alphas[1];
        col3.a = alphas[2];
        col4.a = alphas[3];
    }
@param col1 bottom left color
@param col2 bottom right color
@param col3 top right color
@param col4 top left color
core/src/com/ray3k/skincomposer/GradientDrawable.java