This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, August 16, 2005 1:21:44 PM(UTC)
Groups: Registered, Tech Support
Posts: 46
Version: 14Interface: .NETSample Type: SnippetDevelopment Environment: VB.NETKeywords: Annotations annotation flip mirror transformVB.NET Annotation Flip Example
' This snippet translated from C# to VB by:
' Michael J. Loux Jr - Maine Mutual Group
Private
Sub FlipImageAndAnnotations(ByVal horizontal As Boolean, ByVal container As AnnContainer, ByVal viewer As RasterImageViewer)
' Calculate the origin
Dim origin As AnnPoint = New AnnPoint(viewer.Image.ImageWidth / 2, viewer.Image.ImageHeight / 2, AnnUnit.Pixel)
' Flip the image
viewer.Image.FlipViewPerspective(horizontal)
' Now flip each object around the origin
Dim sx As Single = IIf(horizontal, -1, 1)
Dim sy As Single = IIf(horizontal, 1, -1)
Dim obj As AnnObject
For Each obj In container.Objects
obj.Scale(sx, sy, origin)
Next
End Sub
If you have any questions about this example, please post back to this thread. Thanks,
Gabriel
Gabe
Developer Support
LEAD Technologies, Inc.
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.