AGI STK Graphics 11 Send comments on this topic.
PixelOffset Property (IAgStkGraphicsTextBatchPrimitiveOptionalParameters)
See Also  Example





Description

Gets or sets the per-batch pixel offset, which is applied to each string in the text batch. The array contains one x pixel offset followed by one y pixel offset.

Property type

Read-write property

Syntax

[Visual Basic .NET]
Public Property PixelOffset() As System.Array

[C#]
public System.Array PixelOffset {get; set;}

[Managed C++]
public: __property System::Array^ get_PixelOffset();
public: __property void set_PixelOffset(
System::Array ^
);

[Unmanaged C++]
public: HRESULT get_PixelOffset(
SAFEARRAY ** ppRetVal
);
public: HRESULT put_PixelOffset(
SAFEARRAY * pNewPixelOffset
);

[Java]
public Object[] getPixelOffset();public void setPixelOffset(
Object[]
);

Remarks

The pixel offset defines a screen-space translation for a string 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 string in a text batch and a point in a point batch have the same position, the string may have a pixel offset applied to it so it doesn't overlap the point.

If per-string pixel offsets were specified with Set Pixel Offsets the per-batch pixel offset is ignored.

Example

Shows the format of the PixelOffset property when setting the per-batch pixel offset.
[C#] Copy Code
Array pixelOffset = new object[] 

    1
    2 
}; 
 
IAgStkGraphicsTextBatchPrimitiveOptionalParameters parameters = sceneManager.Initializers.TextBatchPrimitiveOptionalParameters.Initialize(); 
parameters.PixelOffset = pixelOffset; 
 

Shows the format of the PixelOffset property when setting the per-batch pixel offset.
[Visual Basic .NET] Copy Code
Dim pixelOffset As Array = New Object() {1, 2}

Dim parameters As IAgStkGraphicsTextBatchPrimitiveOptionalParameters = sceneManager.Initializers.TextBatchPrimitiveOptionalParameters.Initialize()
parameters.PixelOffset = pixelOffset

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1