LEADTOOLS Support
Document
Document SDK Questions
Re: Transform between RasterImageViewer and Microsoft.Ink
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, November 24, 2010 4:55:26 PM(UTC)
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
#2
Posted
:
Wednesday, November 24, 2010 5:34:51 PM(UTC)
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)
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)
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)
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.
LEADTOOLS Support
Document
Document SDK Questions
Re: Transform between RasterImageViewer and Microsoft.Ink
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.