STK Graphics PrimitivesSend comments on this topic.
IAgStkGraphicsFlipFilter Interface

Description

Flips the source raster along the given Flip Axis.

Public Properties

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

Interfaces

Implemented Interface
IAgStkGraphicsRasterFilter

CoClasses that Implement IAgStkGraphicsFlipFilter

Example

Flip an image
[C#]
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.2, 0.2,
    AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitFraction,
    AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitFraction
};
((IAgStkGraphicsOverlay)overlay).Origin = AgEStkGraphicsScreenOverlayOrigin.eStkGraphicsScreenOverlayOriginTopLeft;
overlay.Texture = texture;

overlayManager.Add((IAgStkGraphicsScreenOverlay)overlay);
Flip an image
[Visual Basic .NET]
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))
© 2024 Analytical Graphics, Inc. All Rights Reserved.