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
 Refreshing Magnifier while resizing
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

kturkay

44 Posts

Posted - Apr 02 2021 :  17:20:50  Show Profile  Reply
Hi sir,
is there a way to force refresh of magnifer layer while resizing it ?

my attempt #1 failed

MagnifierLayer=1;
procedure TForm1.ievect1LayerNotify(Sender: TObject; layer: Integer;
  Event: TIELayerEvent);
begin
   if(event=TIELayerEvent.ielResizing) then
   begin
     ievect1.Layers[MagnifierLayer].Refresh;
     ievect1.Update;
   end;
end;


(btw, thanks in advance)

xequte

38182 Posts

Posted - Apr 03 2021 :  18:35:46  Show Profile  Reply
Hi

Update(); should force the layer to be repainted.

Are you seeing a caching issue?

Does disabling the layer cache make a difference?

https://www.imageen.com/help/TImageEnView.LayersCaching.html

You can also force a refresh using:

ImageEnView1.LayersSetProperties( LYR_ALL_LAYERS, IELP_LAYER_CACHE_CLEAR, True );

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

kturkay

44 Posts

Posted - Apr 03 2021 :  21:38:58  Show Profile  Reply
none of them helped.
I think its all about magnify layer functionality.
when resizing it, stretches old magnifier layer image till end of resizing. when resized event occured magnifier layer's iebitmap gets the new scaled part into.

you can check the demo magnify2 of imageen. it doesnt updates the maginifier layers's content till resize finished.

maybe need to use iexlayers>TIEImageLayer.PaintTo or some codeblocks in it.
Go to Top of Page

xequte

38182 Posts

Posted - Apr 04 2021 :  01:06:03  Show Profile  Reply
Hi

Do you mean how the Aspect Ratio is lost while sizing the magnify layer (until resizing ends)?

I'll address that for the next update.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

kturkay

44 Posts

Posted - Apr 04 2021 :  07:01:10  Show Profile  Reply
this video may explain better what I mean.
https://drive.google.com/file/d/1J1TJqyi6gFxE8p5vdEltaEzYPTB6U8GY/view?usp=sharing

for now my temporal solution is the code as below.its better to see background canvas rather than outdated maginifer content:

procedure TfmScreenShot.IvLayerNotify(Sender: TObject; layer: Integer;
  Event: TIELayerEvent);
begin

  if (Event = TIELayerEvent.ielResizing) then
    Iv.Layers[MagnifierLayer].Transparency := 0
  else if (Event = TIELayerEvent.ielResized) then
    Iv.Layers[MagnifierLayer].Transparency := 255
end;



Go to Top of Page

xequte

38182 Posts

Posted - Apr 05 2021 :  23:14:17  Show Profile  Reply
Yes, that issue is fixed in the coming release.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: