STK Graphics PrimitivesSend comments on this topic.
SetColors Method (IAgStkGraphicsMarkerBatchPrimitiveOptionalParameters)
See Also
Colors
An array containing the numeric representation of the color for each marker in the batch. There must be one color for each position passed to the Marker Batch Primitive's Set or SetPartial method. In .NET a Color should be translated a number by calling its ToArgb method and casting the result as an unsigned integer.
Windows





Windows & Linux

Description

Defines a collection of colors, one for each marker in the batch.

Syntax

[Visual Basic .NET]
Public Sub SetColors( _
    ByVal Colors As System.Array _
)
[C#]
public void SetColors(
    System.Array Colors
);
[Managed C++]
public: void SetColors(
    System::Array ^ Colors
);
[Unmanaged C++]
public: HRESULT SetColors(
    SAFEARRAY * * Colors
);
[Java]
public void setColors(
    AgSafeArray Colors
);
[Python - STK API ]
def SetColors(self, Colors:list) -> None:

Parameters

Colors
An array containing the numeric representation of the color for each marker in the batch. There must be one color for each position passed to the Marker Batch Primitive's Set or SetPartial method. In .NET a Color should be translated a number by calling its ToArgb method and casting the result as an unsigned integer.

Remarks

If per-marker or per-batch textures are used, the texture is modulated with the per-marker color defined with SetColors.

Per-marker colors override the per-batch color. Therefore, when per-marker colors are defined with this method, the marker batch's Color property is ignored.

See Also

Example

Shows the format of the Colors parameter when setting per marker colors.
[C#]
Array colors = new object[]
{
    Color.Red.ToArgb(),
    Color.Green.ToArgb(),
    Color.Blue.ToArgb(),
    Color.White.ToArgb()
};

IAgStkGraphicsMarkerBatchPrimitiveOptionalParameters parameters = sceneManager.Initializers.MarkerBatchPrimitiveOptionalParameters.Initialize();
parameters.SetColors(ref colors);
Shows the format of the Colors parameter when setting per marker colors.
[Visual Basic .NET]
Dim colors As Array = New Object() {Color.Red.ToArgb(), Color.Green.ToArgb(), Color.Blue.ToArgb(), Color.White.ToArgb()}

Dim parameters As IAgStkGraphicsMarkerBatchPrimitiveOptionalParameters = sceneManager.Initializers.MarkerBatchPrimitiveOptionalParameters.Initialize()
parameters.SetColors(colors)
© 2024 Analytical Graphics, Inc. All Rights Reserved.