Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Monday, July 31, 2006 3:53:48 AM(UTC)


Groups: Registered
Posts: 51


how is possible to make the AnnStampObject transparent to mouse clicks. If  I have two or more AnnStampObject one over one, with a transparent color defined how I can click on the picture and select what I have under the stamp?. I use Dotnet 14.5 version with VB.



Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, August 2, 2006 8:30:49 AM(UTC)


Groups: Manager, Tech Support
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

I don't know of a direct way to do that, but you could try to do it indirectly as follows:
1. When detecting the mouse click on the stamp object, examine if the coordinates are on the transparent part or not.
2. If they are, store the coordinates and hide the object.
3. Call the HitTest method using the same coordinates to check if there's an object beneath the stamp you have just hidden.
4. Show the stamp object again.

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
#3 Posted : Friday, August 18, 2006 10:57:23 AM(UTC)


Groups: Registered
Posts: 51


how I can get the coordinates of the pixel in the AnnObject. The HitTest method use the screen coordinates or the mouse down event, that are the screen coordinates. So if I don't wrong i have to convert the coordinates. I think to subtract the BoundingRectangle coordinates from then coordinates of the HitTest method, but this is not correct because the HitTest method use the screen coordinates, and if i0m working in zoom mode this is not correct. What can I try?

#4 Posted : Wednesday, August 23, 2006 4:10:19 AM(UTC)

Adnan Ismail  

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)


To convert from screen coordinates to bitmap coordinates, you can use the following sample:

Private Sub RasterImageViewer1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles RasterImageViewer1.MouseDown
        Dim _trans As New Leadtools.Helpers.Transformer
        _trans.Transform = RasterImageViewer1.Transform
        Dim ptIn As New PointF(e.X, e.Y)
        Dim ptOut = _trans.PointToLogical(ptIn)
        Me.Text = ptOut.X.ToString + ":" + ptOut.Y.ToString
 End Sub

The sample above returns the actual coordinates of a certain pixel regardless of zooming in or out the image and scrolling it up or down.

For more information about the transformation mechanism, refer to the "Transformer Class" topic in the .NET Class Library help file.

Kind regards,

#5 Posted : Thursday, August 31, 2006 7:43:52 AM(UTC)


Groups: Registered
Posts: 51


all works fine!!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.145 seconds.