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 : Tuesday, August 16, 2005 1:21:44 PM(UTC)

Gabe  
Gabe

Groups: Registered, Tech Support
Posts: 46


Version: 14
Interface: .NET
Sample Type: Snippet
Development Environment: VB.NET
Keywords: Annotations annotation flip mirror transform

VB.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.

LEAD Logo
 

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.

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