Not sure how/if anyone will use this, but here it is.
p is the percent (0-100) and box is the area that the bar will fill. Keep box fairly small or it will slow your script down.
Simba Code:
procedure TMufasaBitmap.percentBar(p: integer; box: TBox);
var
x2, i, j, a, b, len: integer;
h1, h2, step, deg: extended;
aH: TExtendedArray;
col: TColor;
box2: TBox;
m: TPoint;
tpa: TPointArray;
atpa: T2DPointArray;
hit: boolean;
begin
p := min(p, 100);
x2 := box.getWidth()*p div 100;
box2 := box;
box2.x2 := x2;
tpa := box2.createTPA();
if length(tpa) < 1 then exit();
a := tpa.getBounds.x1;
b := tpa.getBounds.x2+1;
tpa.sortByXValue(true);
setLength(atpa, (b-a));
for j := a to b do
begin
hit := false;
for i := 0 to high(tpa) do
begin
if j = tpa[i].x then
begin
atpa[j-a].append(tpa[i]);
hit := true;
end
else if hit then break;
end;
end;
h1 := 0;
h2 := p/3;
len := length(atpa);
if len = 1 then exit();
deg := abs(h1-h2);
step := deg/(len-1);
for i := 0 to (len-1) do
aH.append(h1+(i*step));
for i := 0 to high(atpa) do
begin
col := hslToColor(aH[i], 100, 50);
self.drawTPA(atpa[i], col);
end;
m := box.getMiddle();
m.x := max(0, m.x-8);
m.y := max(0, m.y-5);
self.drawText(intToStr(p)+'%', m, upchars, true, TColor($ff6699));
end;
it isn't efficient at all but I'm too lazy to fix it