AGI STK Graphics 11 Send comments on this topic.
InitializeWithPositionSize Method (IAgStkGraphicsTextureScreenOverlayFactory)
See Also  Example
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 Screen Overlay Unit, y Screen Overlay Unit.
Size
An array with a size of 4 that represents the size of the overlay. The elements are in the order width, height, width Screen Overlay Unit, height Screen Overlay Unit.





Description

Initializes the overlay with the specified position and size.

Syntax

[Visual Basic .NET]
Public Function InitializeWithPositionSize( _
   ByRef Position As System.Array, _
   ByRef Size As System.Array _
) As IAgStkGraphicsTextureScreenOverlay

[C#]
public IAgStkGraphicsTextureScreenOverlay InitializeWithPositionSize(
ref System.Array Position,
ref System.Array Size
);

[Managed C++]
public: IAgStkGraphicsTextureScreenOverlay^ InitializeWithPositionSize(
System::Array ^^ Position,
System::Array ^^ Size
);

[Java]
public IAgStkGraphicsTextureScreenOverlay initializeWithPositionSize(
Object[] Position,
Object[] Size
);

[Unmanaged C++]
public: HRESULT InitializeWithPositionSize(
SAFEARRAY ** Position,
SAFEARRAY ** Size,
IAgStkGraphicsTextureScreenOverlay ** ReturnValue
);

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 Screen Overlay Unit, y Screen Overlay Unit.
Size
An array with a size of 4 that represents the size of the overlay. The elements are in the order width, height, width Screen Overlay Unit, height Screen Overlay Unit.

Example

Shows the format of the Position and Size parameters when creating a texture screen overlay.
[C#] Copy Code
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] Copy Code
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)

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1