KitchenDraw SDK 2
Show / Hide Table of Contents

Method PlaceText

PlaceText(string, double, TextColor, TextColor, ViewType, Object, double, double, int, bool)

Places a special type of object in the scene that displays the specified text.

Declaration
public Scene.Object PlaceText(string text, double textHeight, Scene.TextColor backgroundColor = TextColor.None, Scene.TextColor foregroundColor = TextColor.Black, Scene.ViewType viewType = (Scene.ViewType)-1, Scene.Object hostObject = null, double x = 0, double y = 0, int angleInDegrees = 0, bool centered = false)
Parameters
Type Name Description
string text

A text to display

double textHeight

A height of text (in scene units)

Scene.TextColor backgroundColor

Background color of the text

Scene.TextColor foregroundColor

Foreground color of the text

Scene.ViewType viewType

View type on which the text is shown. -1 may be specified to denote current view.

Scene.Object hostObject

An object that will host the text. If null, the text object is standalone.

double x

If the text is hosted by another object, denotes X offset from the object's center. If the text is standalone, denotes X position of the text in scene coordinate space.

double y

If the text is hosted by another object, denotes Y offset from the object's center. If the text is standalone, denotes Y position of the text in scene coordinate space.

int angleInDegrees

Rotation angle for the text, in degrees, counterclock-wise.

bool centered

If true, the (x,y) position denotes the center of the text object. Otherwise, (x,y) denotes the left bottom corner of the area representing the text.

Returns
Type Description
Scene.Object

The placed text object.

In this article
Back to top Generated by DocFX