Rotating an image that contains annotations

Discussions about annotation support.
Post Reply
rgoodson40
Posts: 32
Joined: Sun Jan 30, 2011 8:40 pm

Rotating an image that contains annotations

Post by rgoodson40 » Thu Feb 09, 2012 2:51 am

When I rotate an image that contains annotations, the annotations don't get rotated along with the image. I know this is possible because its working in the VB Annotations demo application, however I cannot figure out what it is doing that mine is not. Do you know what I could be doing wrong?

My code for rotating is:

If m_DocumentFormat = GdPicture.DocumentFormat.DocumentFormatJPEG Then
Viewer1.Rotate(RotateFlipType.Rotate90FlipNone)
ElseIf m_DocumentFormat = GdPicture.DocumentFormat.DocumentFormatPDF Then
m_NativePDF.RotatePage(90)
ElseIf m_DocumentFormat = GdPicture.DocumentFormat.DocumentFormatTIFF Then
m_GdPictureImaging.Rotate(m_NativeImage, RotateFlipType.Rotate90FlipNone)
End If

Viewer1.Redraw()

Thanks,
Reagan

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Rotating an image that contains annotations

Post by Loïc » Thu Feb 09, 2012 12:03 pm

Hello,

You have to use the RotateAnnotations method.

IE:

Code: Select all

If m_DocumentFormat = GdPicture.DocumentFormat.DocumentFormatJPEG Then
Viewer1.Rotate(RotateFlipType.Rotate90FlipNone)
ElseIf m_DocumentFormat = GdPicture.DocumentFormat.DocumentFormatPDF Then
m_NativePDF.RotatePage(90)
ElseIf m_DocumentFormat = GdPicture.DocumentFormat.DocumentFormatTIFF Then
m_GdPictureImaging.Rotate(m_NativeImage, RotateFlipType.Rotate90FlipNone)
End If
Viewer1.RotateAnnotations(90)
Viewer1.Redraw()
Kind regards,

Loïc

rgoodson40
Posts: 32
Joined: Sun Jan 30, 2011 8:40 pm

Re: Rotating an image that contains annotations

Post by rgoodson40 » Thu Feb 09, 2012 9:17 pm

works great. thank you.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Rotating an image that contains annotations

Post by Loïc » Thu Feb 09, 2012 9:47 pm

ok perfect, thank you for the return.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest