WebGLControl.createTextTexture

Syntax

createTextTexture(name: String, text: String, font: PP.Font, background: PP.Color);

Parameters

name. Texture identifier.

text. Added text.

font. Text font.

background. Background color.

Description

The createTextTexture method creates text texture.

Example

To execute the example, the HTML page must contain the MapChart  component named map (see Example of Creating the MapChart Component). Spherical map must be opened. Create text texture:

// Get control of spherical map
var control = map.getGLControl();
// Create text texture
control.createTextTexture("../../build/img/Earth.png", "World",new PP.Font({
    Size: 9,
    Family: PP.Font.Family.Calibri
}));
// Clear map
control.clear();
// Draw only sphere surface with texture
control.renderMesh(control.getMesh(0));

As a result text texture is rendered:

See also:

WebGLControl