在一个事件中:
image1.width:=300;
image1.height:=200;
image1.canvas.line(300,200);另个事件中
image1.width:=600;
image1.height:=400;
image1.canvas.line(600,400);好了,就算你用尽吃奶的力气,也永远无法使它变的更大!!!\
到底为什么?
image1.width:=300;
image1.height:=200;
image1.canvas.line(300,200);另个事件中
image1.width:=600;
image1.height:=400;
image1.canvas.line(600,400);好了,就算你用尽吃奶的力气,也永远无法使它变的更大!!!\
到底为什么?
image1.stretch:=true;image1.autosize:=false;
var
TmpBmp: TBitmap;
ARect: TRect;
h, w: Integer;
begin
Result := False;
try
TmpBmp := TBitmap.Create;
try
h := Floor(Bitmap.Height * (iPercent / 100)); //uses Math;
w := Floor(Bitmap.Width * (iPercent / 100));
ARect := Rect(0, 0, w, h);
TmpBmp.Width := w;
TmpBmp.Height := h;
TmpBmp.Canvas.StretchDraw(ARect, Bitmap);
Bitmap.Assign(TmpBmp);
finally
TmpBmp.Free;
end;
Result := True;
except
Result := False;
end;
end;