Курсовая работа: Оптимальный раскрой материала с максимальной прибылью
brush.Color:=clBtnFace;
fillRect(rect(0, 0, image.width, image.height));
brush.Color:=clGray;
pen.Color:=clGray;
rectangle(trunc(k_x*sum), 0, trunc(k_x*materialLength), 50);
brush.Color:=clWhite;
pen.Color:=clGray;
rectangle(0, 0, trunc(k_x*sum), 50);
pen.Color:=clRed;
brush.Style:=bsClear;
textOut(0,51,'0');
curr_x:=0;
curr_x_scr:=0;
for i:=0 to detailAmount-1 do
begin
for j:=0 to x[i]-1 do
begin
curr_x:=curr_x+details[i].l;
curr_x_scr:=curr_x_scr+k_x*details[i].l;
if curr_x<>materialLength then
begin
moveTo(trunc(curr_x_scr),0);
lineTo(trunc(curr_x_scr),50);
textOut(trunc(curr_x_scr), 51, intToStr(curr_x));
// textOut(trunc(curr_x_scr-15), 21, '('+intToStr(i+1)+')');
end;
end;
end;
end;