请问怎么样才能实现,在一个IMAGE中,当移动到图片的边缘的时候,可以按照比例放大缩小,或者任意放大和缩小,当鼠标移动到图片上面的时候可以拖动图片?

解决方案 »

  1.   

    当需要旋转图象的时候,有一个旋转选择开关,当选择该开关以后,移动到IMAGE的四个角的时候,鼠标就变成旋转的图标了?然后根据需要就可以旋转图象了
      

  2.   

    你发给我吧[email protected]谢谢了!!!!
      

  3.   

    可以给我一份吗?
    [email protected]
      

  4.   

    我还是没有收到,您再给我发一次吧,我很急用!
    用这个信箱吧[email protected]
      

  5.   

    能发我一份吗?谢谢
     [email protected]
      

  6.   

    给一段我写的代码:
    //放大
    procedure TfrmPicView.N1Click(Sender: TObject);
    var
      i:single;
    begin
      image1.Cursor := crDefault;
      if (sender as TMenuItem).name = 'N1' then
        i := 1.6
      else
        i := 0.625;
      image1.Width := round((image1.Width / image1.Picture.Width * i) * image1.Picture.Width);
      image1.height := round((image1.height / image1.Picture.height * i) * image1.Picture.height);
      if image1.Width >= width then
      begin
        if image1.Left > 0 then
          image1.Left := 0;
        image1.Cursor := crHandPoint;
      end
      else
        image1.Left := round((width - image1.Width)/2);
      if image1.height >= height then
      begin
        if image1.Top > 0 then
          image1.top := 0;
        image1.Cursor := crHandPoint;
      end
      else
        image1.top := round((height - image1.height)/2);  if image1.Width / image1.Picture.Width > 10 then
        n1.Enabled := false
      else
        n1.Enabled := true;
      if image1.Width / image1.Picture.Width < 0.1 then
        n2.Enabled := false
      else
        n2.Enabled := true;
    end;//缩小
    procedure TfrmPicView.N1Click(Sender: TObject);
    var
      i:single;
    begin
      image1.Cursor := crDefault;
      if (sender as TMenuItem).name = 'N1' then
        i := 1.6
      else
        i := 0.625;
      image1.Width := round((image1.Width / image1.Picture.Width * i) * image1.Picture.Width);
      image1.height := round((image1.height / image1.Picture.height * i) * image1.Picture.height);
      if image1.Width >= width then
      begin
        if image1.Left > 0 then
          image1.Left := 0;
        image1.Cursor := crHandPoint;
      end
      else
        image1.Left := round((width - image1.Width)/2);
      if image1.height >= height then
      begin
        if image1.Top > 0 then
          image1.top := 0;
        image1.Cursor := crHandPoint;
      end
      else
        image1.top := round((height - image1.height)/2);  if image1.Width / image1.Picture.Width > 10 then
        n1.Enabled := false
      else
        n1.Enabled := true;
      if image1.Width / image1.Picture.Width < 0.1 then
        n2.Enabled := false
      else
        n2.Enabled := true;
    end;
      

  7.   

    哎,还是没有收到,帮忙发到[email protected]
    万分感谢!!
      

  8.   

    放大和缩小为什么不用 StrecthDraw
      

  9.   

    能发我一份吗?谢谢
     [email protected]
    [email protected]@sina.com