ITerrainImageLabel81

The Image Label object is a simplified version of the ITerrainLabel81 object. It allows you to create a label that has an image only. For more information about TerraExplorer's labels, see "Text and Image Labels" in the TerraExplorer User Manual.

 

 

Properties

 

Action

An IAction81 representing the operation that takes place when the object is clicked in the Project Tree.

Attachment

An IAttachment81 representing the attachment behavior of the label.

BlendMode

Determines how the label's image blends with the background terrain or model layer.

ID

Gets the ID of the label. (Inherited from ITerraExplorerObject81)

ImageFileName

Gets and sets a full pathname or a URL to the label's image file.

Message

An IMessageObject81 representing the message object assigned to the object.

ObjectType

Gets an enum that identifies the type of the object. (Inherited from ITerraExplorerObject81)

Position

An IPosition81 representing the position and orientation of the label on the terrain.

SaveInFlyFile

Gets and sets a Boolean that determines whether the label is saved in the Fly file. (Inherited from ITerraExplorerObject81)

Style

An ILabelStyle81 representing details (e.g. color, size and position) regarding the display of the label in the 3D Window.

Terrain

An ITerrainObject81 representing terrain properties including draw order and ground object status.

TimeSpan

An ITimeSpan81 representing the timespan in which the label is visible on the terrain.

Tooltip

An ITooltip81 representing the tooltip that displays when a mouse cursor is placed over the label in the 3D Window.

TreeItem

An ITreeItem81 describing the representation of the label in the Project Tree.

Visibility

An IVisibility81 representing the visibility of the label at different distances.

 

Methods

 

GetClientData

Gets an array of text strings assigned to each object global namespace. (Inherited from ITerraExplorerObject81)

GetParam

Reserved. Currently not used. (Inherited from ITerraExplorerObject81)

SetClientData

Sets an array of text strings assigned to each object global namespace. (Inherited from ITerraExplorerObject81)

SetImageFromBuffer

Sets the image label from a memory buffer.

SetParam

Reserved. Currently not used. (Inherited from ITerraExplorerObject81)

 

BlendMode

Determines how the label's image blends with the background terrain or model layer:

§  1 – Adds the image color to the background, e.g., if the terrain is green (RGB: 0, 255, 0), and a red label is drawn on it (RGB: 255, 0, 0), its RGB value is added to the background, to produce a yellow blend (RGB: 255, 255, 0).

§  0 – Uses normal blending based on the opacity set for the image.  

 

JavaScript

 

 

 

BlendMode

 

C#

 

 

 

int BlendMode { get; set; }

 

C++

 

HRESULT BlendMode([out, retval] long* pVal)

HRESULT BlendMode([in] long pVal)

 

ImageFileName

Gets and sets a full pathname or a URL to the label's image file.

 

JavaScript

 

 

 

ImageFileName

 

C#

 

 

 

string ImageFileName { get; set; }

 

C++

 

HRESULT ImageFileName([out, retval] BSTR* pVal)

HRESULT ImageFileName([in] BSTR pVal)

 

SetImageFromBuffer

Sets the image label from a memory buffer. See the C# and JavaScript examples below of how to create an image label from a buffer.

 

JavaScript

 

SetImageFromBuffer(

       Buffer,

       Width,

       Height)

 

C#

 

void SetImageFromBuffer (

       object       Buffer,

       int    Width,

       int    Height)

 

C++

 

HRESULT SetImageFromBuffer (    

       [in] VARIANT Buffer,

       [in] long    Width,

       [in] long    Height

 

Parameters

Buffer

The memory buffer that contains the label's image file.

Width

Width of the buffer.

Height

Height of the buffer.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.