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
 Showing Hint
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

pierrotsc

USA
499 Posts

Posted - Feb 19 2012 :  15:20:10  Show Profile  Reply
I have showhint turn on for my imageenvect. Is it possible to add some code in the onmousemove event to display the RGB values of the pixels under the cursor in real time in a hint window?
Right now i am showing the values in a status bar but would like to be shown next to the cursor.
Like, when i rotate an image, i can see the rotation degree being displayed.

Thanks.
P

fab

1310 Posts

Posted - Feb 20 2012 :  00:03:24  Show Profile  Reply
Next minor version will have the method SetInteractionHint to allow custom hints in TImageEnView/Vect.
It is already present in current version but as "protected", so you need to inherits from TImageEnView/Vect to see it.
Go to Top of Page

pierrotsc

USA
499 Posts

Posted - Feb 20 2012 :  09:15:42  Show Profile  Reply
Well, i was just trying to have imageenvect.hint display the current RGB values of the pixel under the cursor.
Ok..I'll wait...
Go to Top of Page

xequte

39061 Posts

Posted - Feb 21 2012 :  02:24:35  Show Profile  Reply
Hi

You should be able to do this just using the standard hint of TImageEnVect. In the OnMouseMove event set the hint with the RGB value and use CancelHint when it changes.

Something like:

procedure Tfrmmain.AnIEVectMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
  sHint : string;
begin
  sHint := GetRGBValueAtPos(Sender, X, Y) ;
  if sHint <> AnIEVect.Hint then
  begin
    Application.CancelHint;
    AnIEVect.Hint := sHint;
  end;
end;



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

pierrotsc

USA
499 Posts

Posted - Feb 21 2012 :  09:55:05  Show Profile  Reply
thanks..I will try that.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: