小
小学生_hjz
Unregistered / Unconfirmed
GUEST, unregistred user!
这是一个将图片顺时针旋转90度的例子经运行后可以得到顺时针旋转90度.可我读程序怎么看怎么是逆时针旋转90度的效果实.在是搞不懂,谁能告诉我!
procedure TForm1.Button2Click(Sender: TObject);
var
i, j: integer;
begin
//确定旋转后位图的大小
image2.Picture.Bitmap.Height := image1.picture.width;
image2.Picture.Bitmap.Width := image1.picture.height;
for i := 0 to image1.Height do
for j := 0 to image1.Width do
image2.canvas.Pixels[(-i + image1.Height),
-----------------------------------------------
j] := image1.canvas.Pixels[j, i];
----------------------------------------------
end;
procedure TForm1.Button2Click(Sender: TObject);
var
i, j: integer;
begin
//确定旋转后位图的大小
image2.Picture.Bitmap.Height := image1.picture.width;
image2.Picture.Bitmap.Width := image1.picture.height;
for i := 0 to image1.Height do
for j := 0 to image1.Width do
image2.canvas.Pixels[(-i + image1.Height),
-----------------------------------------------
j] := image1.canvas.Pixels[j, i];
----------------------------------------------
end;