AGI STK Graphics 11 Send comments on this topic.
SetOrigins Method (IAgStkGraphicsTextBatchPrimitiveOptionalParameters)
See Also  Example
Origins
An array containing a Origin for each string in the batch. There must be one origin for each string passed to the Text Batch Primitive's Set or SetPartial method.





Description

Defines a collection of origins, one for each string in the batch.

Syntax

[Visual Basic .NET]
Public Sub SetOrigins( _
   ByRef Origins As System.Array _
) 

[C#]
public void SetOrigins(
ref System.Array Origins
);

[Managed C++]
public: void SetOrigins(
System::Array ^^ Origins
);

[Java]
public  setOrigins(
Object[] Origins
);

[Unmanaged C++]
public: HRESULT SetOrigins(
SAFEARRAY ** Origins
);

Parameters

Origins
An array containing a Origin for each string in the batch. There must be one origin for each string passed to the Text Batch Primitive's Set or SetPartial method.

Remarks

The origin defines where the string is placed relative to its position.

Per-string origins override the per-batch origin. Therefore, when per-string origins are defined with this method, Origin is ignored.

Example

Shows the format of the Origins parameter when setting per string origins.
[C#] Copy Code
Array origins = new object[] 

    AgEStkGraphicsOrigin.eStkGraphicsOriginCenter, 
    AgEStkGraphicsOrigin.eStkGraphicsOriginBottomLeft, 
    AgEStkGraphicsOrigin.eStkGraphicsOriginBottomRight, 
    AgEStkGraphicsOrigin.eStkGraphicsOriginTopLeft 
}; 
 
IAgStkGraphicsTextBatchPrimitiveOptionalParameters parameters = sceneManager.Initializers.TextBatchPrimitiveOptionalParameters.Initialize(); 
parameters.SetOrigins(ref origins); 
 

Shows the format of the Origins parameter when setting per string origins.
[Visual Basic .NET] Copy Code
Dim origins As Array = New Object() {AgEStkGraphicsOrigin.eStkGraphicsOriginCenter, AgEStkGraphicsOrigin.eStkGraphicsOriginBottomLeft, AgEStkGraphicsOrigin.eStkGraphicsOriginBottomRight, AgEStkGraphicsOrigin.eStkGraphicsOriginTopLeft}

Dim parameters As IAgStkGraphicsTextBatchPrimitiveOptionalParameters = sceneManager.Initializers.TextBatchPrimitiveOptionalParameters.Initialize()
parameters.SetOrigins(origins)

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1