STK Graphics PrimitivesSend comments on this topic.
SetPixelOffsets Method (IAgStkGraphicsMarkerBatchPrimitiveOptionalParameters)
See Also
PixelOffsets
An array containing a x pixel offset and a y pixel offset for each marker in the batch. There must be one x pixel offset followed by one y pixel offset for each position passed to the Marker Batch Primitive's Set or SetPartial method.
Windows





Windows & Linux

Description

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

Syntax

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

Parameters

PixelOffsets
An array containing a x pixel offset and a y pixel offset for each marker in the batch. There must be one x pixel offset followed by one y pixel offset for each position passed to the Marker Batch Primitive's Set or SetPartial method.

Remarks

The pixel offset defines a screen-space translation for a marker from its position. Positive x values translate to the right and positive y values translate up. This is commonly used when more than one primitive is located at the same position. For example, if a marker in a marker batch and a point in a point batch have the same position, the marker may have a pixel offset applied to it so it doesn't overlap the point.

Per-marker pixel offsets override the per-batch pixel offset. Therefore, when per-marker pixel offsets are defined with this method, MarkerBatchPrimitive.PixelOffset is not used.

See Also

Example

Shows the format of the PixelOffsets parameter when setting per marker pixel offsets.
[C#]
Array pixelOffset = new object[]
{
    1, 2,
    2, 1
};

IAgStkGraphicsMarkerBatchPrimitiveOptionalParameters parameters = sceneManager.Initializers.MarkerBatchPrimitiveOptionalParameters.Initialize();
parameters.SetPixelOffsets(ref pixelOffset);
Shows the format of the PixelOffsets parameter when setting per marker pixel offsets.
[Visual Basic .NET]
Dim pixelOffset As Array = New Object() {1, 2, 2, 1}

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