Click or drag to resize

AnnotateSpaceConverter Class

The AnnotateSpaceConverter class provides helper methods for converting from one coordinate space to another.
The AnnotateSpaceConverter class provides helper methods for converting from one coordinate space to another.
Inheritance Hierarchy
SystemObject
  Atalasoft.AnnotateAnnotateSpaceConverter

Namespace:  Atalasoft.Annotate
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public class AnnotateSpaceConverter : IDisposable

The AnnotateSpaceConverter type exposes the following members.

Constructors
  NameDescription
Public methodAnnotateSpaceConverter
Creates a new instance of AnnotateSpaceConverter specifying the IAnnotate parent and AnnotationData objects that will be used for the conversion methods.
Top
Methods
  NameDescription
Public methodAnnotationSpaceToDocumentSpace(PointF)
Converts a point from annotation space to document space.
Public methodAnnotationSpaceToDocumentSpace(PointF)
Converts an array of points from annotation space to document space.
Public methodAnnotationSpaceToDocumentSpace(PointFCollection)
Returns a new PointFCollection converted from annotation space to document space.
Public methodStatic memberAnnotationSpaceToDocumentSpace(AnnotationData, PointFCollection)
Returns a new PointFCollection converted from annotation space to document space.
Public methodStatic memberAnnotationSpaceToDocumentSpace(AnnotationData, PointF)
Converts a point from annotation space to document space.
Public methodStatic memberAnnotationSpaceToDocumentSpace(AnnotationData, PointF)
Converts a point from annotation space to document space.
Public methodAnnotationSpaceToViewSpace(PointF)
Converts from annotation space to view space.
Public methodAnnotationSpaceToViewSpace(PointF)
Converts an array of points from annotation space to view space.
Public methodStatic memberAnnotationSpaceToViewSpace(IAnnotate, AnnotationData, PointF)
Converts from annotation space to view space.
Public methodStatic memberAnnotationSpaceToViewSpace(IAnnotate, AnnotationData, PointF)
Converts from annotation space to view space.
Public methodDispose
Releases resources used for conversion.
Protected methodDispose(Boolean)
Releases resources used by this object.
Public methodDocumentSpaceToAnnotationSpace(PointF)
Converts a point from document space to annotation space.
Public methodDocumentSpaceToAnnotationSpace(PointF)
Converts an array of points from document space to annotation space.
Public methodDocumentSpaceToAnnotationSpace(PointFCollection)
Returns a new PointFCollection with the points converted from document space to annotation space.
Public methodStatic memberDocumentSpaceToAnnotationSpace(AnnotationData, PointFCollection)
Returns a new PointFCollection with the points converted from document space to annotation space.
Public methodStatic memberDocumentSpaceToAnnotationSpace(AnnotationData, PointF)
Converts a point from document space to annotation space.
Public methodStatic memberDocumentSpaceToAnnotationSpace(AnnotationData, PointF)
Converts an array of points from document space to annotation space.
Public methodDocumentSpaceToViewSpace(PointF)
Converts a point from document space to view space.
Public methodDocumentSpaceToViewSpace(PointF)
Converts an array of points from document space to view space.
Public methodDocumentSpaceToViewSpace(RectangleF)
Converts a rectangle from document space to view space.
Public methodStatic memberDocumentSpaceToViewSpace(IAnnotate, PointF)
Converts a point from document space to view space.
Public methodStatic memberDocumentSpaceToViewSpace(IAnnotate, RectangleF)
Converts a rectangle from document space to view space.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Finalizes an instance of the AnnotateSpaceConverter class.
(Overrides ObjectFinalize.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodViewSpaceToAnnotationSpace(PointF)
Converts a point from view space to annotation space.
Public methodViewSpaceToAnnotationSpace(PointF)
Converts an array of PointF from view space to annotation space.
Public methodStatic memberViewSpaceToAnnotationSpace(IAnnotate, AnnotationData, PointF)
Converts a point from view space to annotation space.
Public methodViewSpaceToDocumentSpace(PointF)
Converts a point from view space to document space.
Public methodViewSpaceToDocumentSpace(PointF)
Converts an array of points from view space to document space.
Public methodViewSpaceToDocumentSpace(RectangleF)
Converts a rectangle from view space to document space.
Public methodStatic memberViewSpaceToDocumentSpace(IAnnotate, PointF)
Converts a point from view space to document space.
Public methodStatic memberViewSpaceToDocumentSpace(IAnnotate, RectangleF)
Converts a rectangle from view space to document space.
Top
Remarks
If any changes occur to the annotation or viewer matrices after the AnnotateSpaceConverter is created, the calculations will not be correct. If changes will be made to the annotation during this time it's best to use the static methods instead.
Examples
The following example converts the rectangular points of an annotation into document space.
ConverterExample
AnnotationUI annotation = this.Viewer.Annotations.ActiveAnnotation;
AnnotateSpaceConverter converter = new AnnotateSpaceConverter(this.Viewer, annotation.Data);
PointF asLocation = converter.AnnotationSpaceToDocumentSpace(annotation.Data.Location);
PointF asLocation2 = converter.AnnotationSpaceToDocumentSpace(new PointF(annotation.Data.Location.X + annotation.Data.Size.Width, annotation.Data.Location.Y + annotation.Data.Size.Height));
converter.Dispose();
ConverterExampleVB
Dim annotation As AnnotationUI =  Me.Viewer.Annotations.ActiveAnnotation 
Dim converter As AnnotateSpaceConverter = New AnnotateSpaceConverter(Me.Viewer,annotation.Data) 
Dim asLocation As PointF = converter.AnnotationSpaceToDocumentSpace(annotation.Data.Location) 
Dim asLocation2 As PointF = converter.AnnotationSpaceToDocumentSpace(New PointF(annotation.Data.Location.X + annotation.Data.Size.Width,annotation.Data.Location.Y + annotation.Data.Size.Height)) 
converter.Dispose()
See Also