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
 Create GridLayer on top of image
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

BionicWave

Germany
33 Posts

Posted - Aug 24 2011 :  13:38:10  Show Profile  Reply
I would like to create a layer on top of a background-image that has shows a grid with the width of the original pixelsize.
So when i zoom into the background-image, the gridwidth grows, as the pixelwidth of the background-image does.
Its the effect you can see in photoshop when zooming deep into an image. If you reach a certain zoomlevel, the grid shows up, so you can easily distinguish all the single pixels.

Is that possible?
Is there an easy example of how to do that?

w2m

USA
1990 Posts

Posted - Aug 24 2011 :  14:20:50  Show Profile  Reply
property DisplayGrid:boolean;

Description

When DisplayGrid is True and the Zoom is equal to or greater than 400, a grid is drawn. Each grid box is equivalent to a bitmap pixel.

Look also iegMINZOOMDISPLAYGRID.

This does exactly what you are looking for except it is not a layer. If DisplayGrid = True with the default iegMINZOOMDISPLAYGRID = 400 then the grid appears when the image is zoomed to 400%.

William Miller
Go to Top of Page

BionicWave

Germany
33 Posts

Posted - Aug 24 2011 :  14:31:18  Show Profile  Reply
Wow, thats nice.
Is it possible to set a different color for the grid?
Go to Top of Page

fab

1310 Posts

Posted - Aug 24 2011 :  23:46:22  Show Profile  Reply
Yes, it is possible to set the pen for the grid using iegGRIDPEN public field (it is a TPen object), for example:

iegGRIDPEN.Color:=clRed;
iegGRIDPEN.Mode:=pmCopy;
ImageEnView1.Update();


iegGRIDPEN is defined in "imageenview" unit.
Go to Top of Page

BionicWave

Germany
33 Posts

Posted - Aug 25 2011 :  00:54:00  Show Profile  Reply
Many thanks to you, guys.
This is exactly what i was looking for.

@fabrizio:
thanks for the info on where to find the fields for the grid.
I will take a look inside the imageenview unit for other options.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: