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

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, November 24, 2010 4:55:26 PM(UTC)
xjgs_xhj

Groups: Registered
Posts: 21


I can clone RasterImageViewer Transform to AnnContainer Transform when implementing Non Automated Annotation Program.Codes:
Private Sub RasterImageViewer1_TransformChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RasterImageViewer1.TransformChanged
If (Not IsNothing(annContainerObj)) Then
annContainerObj.Transform = RasterImageViewer1.Transform.Clone()
End If
End Sub

Now I try to create annotations with Microsoft.Ink in a tablet application.I can't just clone RasterImageViewer1.Transform to inkOverlay.Renderer.How to make it work?Codes:
Private inkOverlay As Microsoft.Ink.InkOverlay
inkOverlay = New Microsoft.Ink.InkOverlay(_RasterImageViewer1)
inkOverlay.EditingMode = Microsoft.Ink.InkOverlayEditingMode.Ink
inkOverlay.Enabled = true

Private Sub RasterImageViewer1_TransformChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RasterImageViewer1.TransformChanged

Using m As Matrix = RasterImageViewer1.GetTransformWithDpi()
inkOverlay.Renderer.SetViewTransform(m)
End Using

End Sub
 

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, November 24, 2010 5:34:51 PM(UTC)
xjgs_xhj

Groups: Registered
Posts: 21


Actually,my qustion is to make inkOverlay.Ink.Strokes positions fixed on image of RasterImageViewer when I sroll/zoom the image.
 
#3 Posted : Thursday, November 25, 2010 5:53:13 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,022

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

I'm not familiar with Microsoft.Ink, but if what you want is to obtain the coordinates of an annotation object, or a specific pixel on screen, please explain to me what exactly you need from the LEADTOOLS controls (not the Ink part), and I might be able to help you.
To do that, I recommend you either use one of our demos or create a small test project and give me a detailed description of what you need from that project (such as location of something).
You can either post it here or send it to support@leadtools.com and mention this post.
When attaching to the forums, do not use the "Preview" feature.
Also, please include your attachments in a ZIP or RAR file.
 
#4 Posted : Saturday, November 27, 2010 3:33:20 AM(UTC)
xjgs_xhj

Groups: Registered
Posts: 21


How to get System.Drawing.Rectangle object of the 'image' in screen physical coordinates when zooming or scrolling?

Would you like to show me a quick vb.net code snippet?I'll try if it's what I want.
 
#5 Posted : Sunday, November 28, 2010 5:23:07 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,022

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

If what you want is the pixel coordinates of a specific part of the image (such as the client area rectangle), you can convert the coordinates between image pixel units and control client units using the Leadtools.Drawing.Transformer class.
To use this class, you assign the Transform Property of the RasterImageViewer object to the Transformer.Transform Property and then use the RectangleToLogical and RectangleToPhysical methods to do the conversion.

 
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.065 seconds.