void barraAvance( int x1, int y1, int x2, int y2, float ValParcial, float ValTotal, color ColorLinea, color ColorRelleno ) { float AnchoReal = ( ( ( ValParcial * 100 ) / ValTotal ) * ( x2 - x1 ) ) / 100; strokeWeight(1); stroke(ColorLinea); noFill(); rectMode(CORNERS); rect(x1, y1, x2, y2); noStroke(); fill(ColorRelleno); rect(x1, y1, x1+AnchoReal+1, y2+1); }