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
 Test if a pixel is visible on screen?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

tedfine

10 Posts

Posted - Jan 06 2018 :  15:15:29  Show Profile  Reply
We have a large bit map. (say, 2000x1000).

Is there any way to test whether a given pixel is actually painted on the screen (or eliminated by re-sampling) when zooming (or ImageEnView1 is resized?)

xequte

38222 Posts

Posted - Jan 07 2018 :  04:39:19  Show Profile  Reply
Hi

This might not be what you are looking for, but you can see if a pixel is onscreen by comparing it to VisibleBitmapRect:

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

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

tedfine

10 Posts

Posted - Jan 07 2018 :  11:29:19  Show Profile  Reply
Hi, Nigel,

Nope, that's not quite what I'm looking for.

Suppose I have an image that is 2000x1000 that I'm displaying it on the screen in a window that is 500x250. Some of the rows from the bitmap just aren't going to be seen on the screen -- because of resampling that gets done.

It's those rows I want to identify. Why? Because I'm drawing a marque in the bitmap itself before displaying it. Perhaps it's 50x60 and located at 0,0. I want the marque to always be visible, if after resampling (assuming the region is in the visual region.)

Perhaps there's a way to do this with layers?

Tom

Go to Top of Page

xequte

38222 Posts

Posted - Jan 07 2018 :  17:38:48  Show Profile  Reply
Hi Tom

OK, there is no way to determine which pixels are shown after a resample (which would be even more complex if a resample filter was used).

From what you are describing it sounds like your marquee should be on a text layer, or you should resample the image before adding your marquee.



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