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
 Pixel Cursor

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
bmesser Posted - Aug 23 2013 : 09:18:29
Hi

I have discovered the DisplayGrid property that outlines each pixel in a grid when you have zoomed into a certain level. I already have functionality that attempts to draw a black rectangle around the selected pixel when you click in the image with the mouse. I have done this by means of the OnDrawBackBuffer action by drawing a small rectangle with the value of the color in it. The trouble is that they don't align exactly and this gets worse the more I zoom in (see screenshot). There maybe an example of how to do this because it must be quite a common problem, can anyone point me at it?

Bruce.

2   L A T E S T    R E P L I E S    (Newest First)
bmesser Posted - Aug 23 2013 : 12:37:54
Thanks Bill, I thought they might be a way but I must have missed that in the help.
w2m Posted - Aug 23 2013 : 10:38:53
This is already done for you with ImageEn.HighlightedPixel

Put this in the OnMouseMove event:

var
iP1: TPoint;

{ Highlight the selected pixel }
if (Paint1.Down) then
begin
  iP1.X := ImageEnView1.Layers[ImageEnView1.LayersCurrent].
    ConvXScr2Bmp(X);
  iP1.Y := ImageEnView1.Layers[ImageEnView1.LayersCurrent].  
    ConvYScr2Bmp(Y);
  ImageEnView1.HighlightedPixel := iP1;
  ImageEnView1.HighlightedPixelColor := clRed;
end;


William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html