STK Graphics PrimitivesSend comments on this topic.
IAgStkGraphicsTextureScreenOverlay Interface

Description

A rectangular overlay that can be assigned a texture.

Public Properties

Public Property MaintainAspectRatioGets or sets a value indicating whether the aspect ratio of the texture screen overlay is maintained or not.
Public Property TextureGets or sets the texture (image) to be drawn on the overlay. Textures can be obtained from SceneManager.Textures.
Public Property TextureFilterGets or sets the filter used for the Texture associated with this overlay.

Interfaces

CoClasses that Implement IAgStkGraphicsTextureScreenOverlay

Example

Draw a new Texture Screen Overlay
[Python - STK API]
# IAgScenario scenario: Scenario object
manager = scenario.SceneManager
overlays = manager.ScreenOverlays.Overlays
textureOverlay = manager.Initializers.TextureScreenOverlay.InitializeWithXYWidthHeight(0, 0, 128, 128)
textureOverlay.Texture = manager.Textures.LoadFromStringUri(r'C:\Program Files\AGI\STK 12\STKData\VO\Textures\agilogo3.ppm')
textureOverlay.MaintainAspectRatio = True
textureOverlay.Origin = AgEStkGraphicsScreenOverlayOrigin.eStkGraphicsScreenOverlayOriginTopLeft
textureOverlay.Position = [[0], [20], [AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitPixels], [AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitPixels]]
overlays.Add(textureOverlay)
# Render the Scene
manager.Render()

Draw a new Texture Screen Overlay
[MATLAB]
% IAgScenario scenario: Scenario object
manager = scenario.SceneManager;
overlays = manager.ScreenOverlays.Overlays;
textureOverlay = manager.Initializers.TextureScreenOverlay.InitializeWithXYWidthHeight(0, 0, 128, 128);
textureOverlay.Texture = manager.Textures.LoadFromStringUri('C:\Program Files\AGI\STK 12\STKData\VO\Textures\agilogo3.ppm');
textureOverlay.MaintainAspectRatio = true;
textureOverlay.Origin = 'eStkGraphicsScreenOverlayOriginTopLeft';
textureOverlay.Position = {0;20;'eStkGraphicsScreenOverlayUnitPixels';'eStkGraphicsScreenOverlayUnitPixels'};
overlays.Add(textureOverlay);
% Render the Scene
manager.Render();


        
© 2024 Analytical Graphics, Inc. All Rights Reserved.