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:10:09 PM(UTC)

Gabe  
Gabe

Groups: Registered, Tech Support
Posts: 46


Version: 14
Interface: .NET
Sample Type: Snippet
Development Environment: C#.NET
Keywords: Annotations annotation flip mirror transform document imaging image mark-up

C#.NET code snippet to flip annotations

      private void FlipImageAndAnnotations(bool horizontal, AnnContainer container, RasterImageViewer viewer)
      {
         // calculate the origin
         AnnPoint origin = 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.
         float sx = horizontal ? -1 : 1;
         float sy = horizontal ? 1 : -1;
 
         foreach(AnnObject obj in container.Objects)
            obj.Scale(sx, sy, origin);
      }


If you have any questions about this example, please post back here.

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