CreateImageLabelFromBuffer
Creates an image label in the 3D Window. The pixel data of the label's image file is retrieved from a memory buffer.
JavaScript |
|
CreateImageLabelFromBuffer( Position, Buffer, Width, Height LabelStyle, GroupID, Description ) |
C# |
|
ITerrainImageLabel80 CreateImageLabelFromBuffer( IPosition80 Position, object Buffer, int Width, int Height, ILabelStyle80 LabelStyle = null, string GroupID = "", string Description = "") |
C++ |
|
HRESULT CreateImageLabelFromBuffer( [in] IPosition80 * Position, [in] VARIANT Buffer, [in] long Width, [in] long Height, [in] ILabelStyle80 LabelStyle, [in] BSTR GroupID, [in] BSTR Description, [out, retval] ITerrainImageLabel80 ** pITerrainImageLabel80) |
Parameters
Position
An IPosition80 representing the position and orientation of the label on the terrain.
Buffer
The memory buffer containing the pixel data of the label's image file. See the C# and JavaScript examples below.
Width
Width, in pixels, of the buffer.
Height
Height, in pixels, of the buffer.
LabelStyle
An ILabelStyle80representing the label style (e.g. color, font and viewing distance properties).
GroupID
The Project Tree group in which the label is created. If it is set to an empty string, the object is created under the root. You can obtain the GroupID by one of the following methods:
· Create the group using IProjectTree80.CreateGroup.
· Find the group, if you know the name, using IProjectTree80.FindItem.
· Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.
Description
The name of the label as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.
Return Value
pITerrainImageLabel80
An ITerrainImageLabel80 representing the newly created Image label.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.