ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Magnify Style not correct
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AndyColmes

USA
351 Posts

Posted - Dec 17 2013 :  06:18:12  Show Profile  Reply
I create a layer for magnifying but it always shows a rectangle even if I specify an ellipse.

var
mS: TIEMagnifyStyle;

mS := iemEllise;

with TestImageEnVect do begin
MouseInteract := MouseInteract + [ miMoveLayers, miResizeLayers ];
MagnifyLayer := LayersAdd;
LayersCurrent := MagnifyLayer;
Layers [ MagnifyLayer ].Name := 'Magnifier';
Layers [ MagnifyLayer ].Width := 100;
Layers [ MagnifyLayer ].Height := 100;
Layers [ MagnifyLayer ].PosX := xt + 10;
Layers [ MagnifyLayer ].PosY := yt + 10;
Layers [ MagnifyLayer ].Magnify.Rate := 2;
Layers [ MagnifyLayer ].Magnify.Enabled := True;
Layers [ MagnifyLayer ].VisibleBox := True;
Layers [ MagnifyLayer ].DrawOuter := True;
Layers [ MagnifyLayer ].Magnify.Style := mS;
MagnifyTrackBar.Enabled := true;
Magnifylbl.Enabled := true;
Update;
end;

Where did I go wrong?

Thanks.

w2m

USA
1990 Posts

Posted - Dec 17 2013 :  09:12:22  Show Profile  Reply
Perhaps the problem was iemEllise vs iemEllipse. I don't think iemEllise would even compile unless you have it defined somewhere.

This works:
procedure TForm1.MagnifyLayer1Click(Sender: TObject);
var
  iIEMagnifyStyle: TIEMagnifyStyle;
  iMagnifyLayer: Integer;
begin
  iIEMagnifyStyle := iemEllipse;
  with ImageEnVect1 do
  begin
    MouseInteract := MouseInteract + [miMoveLayers, miResizeLayers];
    iMagnifyLayer := LayersAdd;
    LayersCurrent := iMagnifyLayer;
    Layers[iMagnifyLayer].Name := 'Magnifier';
    Layers[iMagnifyLayer].Width := 100;
    Layers[iMagnifyLayer].Height := 100;
    Layers[iMagnifyLayer].PosX := 0;
    Layers[iMagnifyLayer].PosY := 0;
    Layers[iMagnifyLayer].Magnify.Rate := 2;
    Layers[iMagnifyLayer].VisibleBox := True;
    Layers[iMagnifyLayer].DrawOuter := True;
    Layers[iMagnifyLayer].Magnify.Style := iIEMagnifyStyle;
    Layers[iMagnifyLayer].Magnify.Enabled := True;
    Update;
  end;
end;

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: