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
 Flash when adding a layer when image having a navigator

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
esprd Posted - Jul 08 2025 : 13:14:30
Hello,

I've got a TImageEnView where I have several layers.

Each time I add a layer, the image "blink" with the "default" new layer :
- adding a ielkImage, a "blank" layer is briefly displayed
- adding a ielkShape iesRectangle, a red ellipse (!) is briefly displayed

To make it simple, it is like there is and Image update withing ImageEnView1.LayersAdd.

This occurs only if I set a navigator for the image.
I tried to add the "ienoDontRefreshSrcIfNavNotFocused" option for SetNavigator, without success.

Is there a way to prevent this ?

I attach a small project repoducing the problem.

Regards,

attach/esprd/202578131341_Test layers - For forum.zip
2967.14 KB

ep
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 08 2025 : 21:43:21
Hi

If you are using a Navigator it will need to update the image to display the view. To prevent this, wrap any "intermediate-state" code in LockUpdate/UnlockUpdate:

  ImageEnView1.LockUpdate();
  ImageEnView1.LayersAdd(iesRectangle,
                         ImageEnView1.Layers[0].PosX,
                         ImageEnView1.Layers[0].PosY,
                         ImageEnView1.Layers[0].Width,
                         ImageEnView1.Layers[0].Height);

  ImageEnView1.Layers[ImageEnView1.LayersCount-1].FillColor := clBlack;
  ImageEnView1.UnlockUpdate();


Nigel
Xequte Software
www.imageen.com