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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Magnify Style not correct

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
AndyColmes Posted - Dec 17 2013 : 06:18:12
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.
1   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Dec 17 2013 : 09:12:22
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