IMcGraphOverlayMapZoomedToImage Method |
![]() |
Namespace: MediaCy.IQL.Display.Overlays
Sub MapZoomedToImage ( <OutAttribute> ByRef LongZoomedCoords As Object, <OutAttribute> ByRef FloatImageCoords As Object, Optional DrawMode As mcGraphOverlayDrawMode = mcGraphOverlayDrawMode.mcgdmScreen )
'This example can be pasted onto the ThisSession IQStudio Object Private WithEvents myOvl As McGraphOverlay Public Sub InitMappingTest() If ThisApplication.ActiveImage Is Nothing Then ShutDownMappingTest Else Set myOvl = ThisApplication.ActiveImage.AnnotationOverlay End If End Sub Public Sub ShutDownMappingTest() Set myOvl = Nothing End Sub Private Sub myOvl_ObjectMoved(ByVal Overlay As IMcGraphOverlay2, ByVal Object As IMcGraphObj2) Dim fptImage As SINGLEPOINT, lptZoomed As LONGPOINT Object.GetPosition fptImage.x, fptImage.y Overlay.MapImageToZoomed fptImage, lptZoomed, mcgdmScreen ThisApplication.Output.PrintMessage "Image Position: " + McToText(fptImage) + " Client Coords: " + McToText(lptZoomed) 'Round trip with output conversion of Variant Dim varImageUnzoomed As Variant Overlay.MapZoomedToImage lptZoomed, varImageUnzoomed, mcgdmScreen ThisApplication.Output.PrintMessage "Image Position Unzoomed: " + McToText(varImageUnzoomed) 'Note that you will typically not get a perfect round-trip for most Magnifications End Sub 'myOvl_ObjectMoved