AGI STK Graphics 11 Send comments on this topic.
SetPixelOffsets Method (IAgStkGraphicsMarkerBatchPrimitiveOptionalParameters)
See Also  Example
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.





Description

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

Syntax

[Visual Basic .NET]
Public Sub SetPixelOffsets( _
   ByRef PixelOffsets As System.Array _
) 

[C#]
public void SetPixelOffsets(
ref System.Array PixelOffsets
);

[Managed C++]
public: void SetPixelOffsets(
System::Array ^^ PixelOffsets
);

[Java]
public  setPixelOffsets(
Object[] PixelOffsets
);

[Unmanaged C++]
public: HRESULT SetPixelOffsets(
SAFEARRAY ** PixelOffsets
);

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.

Example

Shows the format of the PixelOffsets parameter when setting per marker pixel offsets.
[C#] Copy Code
Array pixelOffset = new object[] 

    12
    21 
}; 
 
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] Copy Code
Dim pixelOffset As Array = New Object() {1, 2, 2, 1}

Dim parameters As IAgStkGraphicsMarkerBatchPrimitiveOptionalParameters = sceneManager.Initializers.MarkerBatchPrimitiveOptionalParameters.Initialize()
parameters.SetPixelOffsets(pixelOffset)

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1