AGI STK Graphics 11 Send comments on this topic.
IAgStkGraphicsFlipFilter Interface





Description

Flips the source raster along the given Flip Axis.

Public Properties

Public Property FlipAxis Gets or sets the Flip Axis along which the source raster will be flipped.

Example

Flip an image
[C#] Copy Code
IAgStkGraphicsSceneManager manager = ((IAgScenario)root.CurrentScenario).SceneManager; 
IAgStkGraphicsScreenOverlayCollectionBase overlayManager = (IAgStkGraphicsScreenOverlayCollectionBase)manager.ScreenOverlays.Overlays; 
// 
// The URI can be a file path, http, https, or ftp location 
// 
IAgStkGraphicsRaster image = manager.Initializers.Raster.InitializeWithStringUri( 
    imageFile); 
image.Flip(AgEStkGraphicsFlipAxis.eStkGraphicsFlipAxisVertical); 
 
IAgStkGraphicsRendererTexture2D texture = manager.Textures.FromRaster(image); 
 
IAgStkGraphicsTextureScreenOverlay overlay = manager.Initializers.TextureScreenOverlay.Initialize(); 
((IAgStkGraphicsOverlay)overlay).Size = new object[] 

    0.20.2
    AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitFraction, 
    AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitFraction 
}; 
((IAgStkGraphicsOverlay)overlay).Origin = AgEStkGraphicsScreenOverlayOrigin.eStkGraphicsScreenOverlayOriginTopLeft; 
overlay.Texture = texture; 
 
overlayManager.Add((IAgStkGraphicsScreenOverlay)overlay); 
 

Flip an image
[Visual Basic .NET] Copy Code
Dim manager As IAgStkGraphicsSceneManager = DirectCast(root.CurrentScenario, IAgScenario).SceneManager
Dim overlayManager As IAgStkGraphicsScreenOverlayCollectionBase = DirectCast(manager.ScreenOverlays.Overlays, IAgStkGraphicsScreenOverlayCollectionBase)
'
' The URI can be a file path, http, https, or ftp location
'
Dim image As IAgStkGraphicsRaster = manager.Initializers.Raster.InitializeWithStringUri( _
    imageFile)
image.Flip(AgEStkGraphicsFlipAxis.eStkGraphicsFlipAxisVertical)

Dim texture As IAgStkGraphicsRendererTexture2D = manager.Textures.FromRaster(image)

Dim overlay As IAgStkGraphicsTextureScreenOverlay = manager.Initializers.TextureScreenOverlay.Initialize()
DirectCast(overlay, IAgStkGraphicsOverlay).Size = New Object() _
    { _
        0.2, 0.2, _
        AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitFraction, _
        AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitFraction _
    }
overlay.Texture = texture
DirectCast(overlay, IAgStkGraphicsOverlay).Origin = AgEStkGraphicsScreenOverlayOrigin.eStkGraphicsScreenOverlayOriginTopLeft

overlayManager.Add(DirectCast(overlay, IAgStkGraphicsScreenOverlay))

CoClasses that Implement IAgStkGraphicsFlipFilter

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1