STK Graphics PrimitivesSend comments on this topic.
InitializeWithPositionTexture Method (IAgStkGraphicsTextureScreenOverlayFactory)
See Also
Position
An array with a size of 4 that represents the position of the overlay. The elements are in the order x position, y position, x , y .
Texture
The texture (image) to be drawn on the overlay. Textures can be obtained from SceneManager.Textures.
Windows





Windows & Linux

Description

Initializes the overlay with a specified background texture. The size of the overlay will be the same as the size of the texture.

Syntax

[Visual Basic .NET]
Public Function InitializeWithPositionTexture( _
    ByVal Position As System.Array, _
    ByVal Texture As IAgStkGraphicsRendererTexture2D _
) As IAgStkGraphicsTextureScreenOverlay
[C#]
public IAgStkGraphicsTextureScreenOverlay InitializeWithPositionTexture(
    System.Array Position,
    IAgStkGraphicsRendererTexture2D Texture
);
[Managed C++]
public: IAgStkGraphicsTextureScreenOverlay^ InitializeWithPositionTexture(
    System::Array ^ Position,
    IAgStkGraphicsRendererTexture2D ^ Texture
);
[Unmanaged C++]
public: HRESULT InitializeWithPositionTexture(
    SAFEARRAY * * Position,
    IAgStkGraphicsRendererTexture2D * Texture,
    IAgStkGraphicsTextureScreenOverlay ** ppRetVal
);
[Java]
public IAgStkGraphicsTextureScreenOverlay initializeWithPositionTexture(
    AgSafeArray Position,
    IAgStkGraphicsRendererTexture2D Texture
);
[Python - STK API]
def InitializeWithPositionTexture(self, Position:list, Texture:"IAgStkGraphicsRendererTexture2D") -> "IAgStkGraphicsTextureScreenOverlay":

Parameters

Position
An array with a size of 4 that represents the position of the overlay. The elements are in the order x position, y position, x , y .
Texture
The texture (image) to be drawn on the overlay. Textures can be obtained from SceneManager.Textures.

See Also

Example

Shows the format of the Position and Size parameters when creating a texture screen overlay.
[C#]
Array position = new object[]
{
    0,
    0,
    AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitPixels,
    AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitPixels
};

Array size = new object[]
{
    100,
    200,
    AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitPixels,
    AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitPixels
};

IAgStkGraphicsTextureScreenOverlay screenOverlay = sceneManager.Initializers.TextureScreenOverlay.InitializeWithPositionSize(ref position, ref size);
Shows the format of the Position and Size parameters when creating a texture screen overlay.
[Visual Basic .NET]
Dim position As Array = New Object() {0, 0, AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitPixels, AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitPixels}

Dim size As Array = New Object() {100, 200, AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitPixels, AgEStkGraphicsScreenOverlayUnit.eStkGraphicsScreenOverlayUnitPixels}

Dim screenOverlay As IAgStkGraphicsTextureScreenOverlay = sceneManager.Initializers.TextureScreenOverlay.InitializeWithPositionSize(position, size)
© 2021 Analytical Graphics, Inc. All Rights Reserved.