Text#

Text

Text. Created using POST /drawing/add-text.

A Text object is passed and returned as its identifier, a number. A path that acts on an object takes it as (id).

GET /drawing/text/(id)/position#

Position of the text.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (tuple<double, double, double>)

PUT /drawing/text/(id)/position#

Position of the text.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (tuple<double, double, double>) – The new value.

GET /drawing/text/(id)/rotation#

Rotation of the text as a quaternion.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (tuple<double, double, double, double>)

PUT /drawing/text/(id)/rotation#

Rotation of the text as a quaternion.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (tuple<double, double, double, double>) – The new value.

GET /drawing/text/(id)/face-camera#

Whether the text turns to face the camera, in place of its GET /drawing/text/(id)/rotation.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (bool)

PUT /drawing/text/(id)/face-camera#

Whether the text turns to face the camera, in place of its GET /drawing/text/(id)/rotation.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (bool) – The new value.

GET /drawing/text/(id)/reference-frame#

Reference frame for the positions of the object.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (SpaceCenter.ReferenceFrame)

PUT /drawing/text/(id)/reference-frame#

Reference frame for the positions of the object.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (SpaceCenter.ReferenceFrame) – The new value.

GET /drawing/text/(id)/visible#

Whether the object is visible.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (bool)

PUT /drawing/text/(id)/visible#

Whether the object is visible.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (bool) – The new value.

POST /drawing/text/(id)/remove#

Remove the object.

Parameters:
  • id – The identifier of the Text object.

GET /drawing/text/(id)/content#

The text string

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (string)

PUT /drawing/text/(id)/content#

The text string

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (string) – The new value.

GET /drawing/text/(id)/font#

Name of the font

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (string)

PUT /drawing/text/(id)/font#

Name of the font

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (string) – The new value.

POST /drawing/text/available-fonts#

A list of all available fonts.

Response JSON Object:
  • value (list<string>)

GET /drawing/text/(id)/size#

Font size.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (int32)

PUT /drawing/text/(id)/size#

Font size.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (int32) – The new value.

GET /drawing/text/(id)/character-size#

Character size.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (float)

PUT /drawing/text/(id)/character-size#

Character size.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (float) – The new value.

GET /drawing/text/(id)/style#

Font style.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (UI.FontStyle)

PUT /drawing/text/(id)/style#

Font style.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (UI.FontStyle) – The new value.

GET /drawing/text/(id)/color#

Set the color

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (StdLib.ColorRGB)

PUT /drawing/text/(id)/color#

Set the color

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (StdLib.ColorRGB) – The new value.

GET /drawing/text/(id)/material#

Material used to render the object. Creates the material from a shader with the given name.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (string)

PUT /drawing/text/(id)/material#

Material used to render the object. Creates the material from a shader with the given name.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (string) – The new value.

GET /drawing/text/(id)/alignment#

Alignment.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (UI.TextAlignment)

PUT /drawing/text/(id)/alignment#

Alignment.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (UI.TextAlignment) – The new value.

GET /drawing/text/(id)/line-spacing#

Line spacing.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (float)

PUT /drawing/text/(id)/line-spacing#

Line spacing.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (float) – The new value.

GET /drawing/text/(id)/anchor#

Anchor.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (UI.TextAnchor)

PUT /drawing/text/(id)/anchor#

Anchor.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (UI.TextAnchor) – The new value.