Table of Contents

Constructor DisplayText2

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

DisplayText2(string, double, double, double, double, double, int, int, DisplayStyle, string, string, string, double)

Makes a piece of text.

public DisplayText2(string text, double x, double y, double height, double rotation, double widthFactor, int horizontal, int vertical, DisplayStyle style, string handle, string layer, string fontName, double oblique)

Parameters

text string

The text, one or more lines separated by line feeds, with the format codes of an MTEXT already taken out.

x double

The X of the alignment point.

y double

The Y of the alignment point.

height double

The height of a capital letter.

rotation double

The angle of the baseline in radians.

widthFactor double

The width of a letter relative to its height's usual width; 1 is the font's own.

horizontal int

Where the point lies along the text: 0 left, 1 centre, 2 right.

vertical int

Where the point lies up the text: 0 baseline, 1 bottom, 2 middle, 3 top.

style DisplayStyle

How it is drawn.

handle string

The handle of the entity.

layer string

The layer.

fontName string

The font of its text style: the typeface a TrueType style names (Arial), else the file of its font (romans.shx, arial.ttf); null or empty for the canvas's own.

oblique double

How far the letters lean, in radians clockwise from upright: 0.2618 for the 15 degrees of an italic look.

DisplayText2(string, double, double, double, double, double, int, int, DisplayStyle, string, string, string, double, bool)

Makes a piece of text that may be drawn backwards, as text in a mirrored block is.

public DisplayText2(string text, double x, double y, double height, double rotation, double widthFactor, int horizontal, int vertical, DisplayStyle style, string handle, string layer, string fontName, double oblique, bool backward)

Parameters

text string

The text, one or more lines separated by line feeds.

x double

The X of the alignment point.

y double

The Y of the alignment point.

height double

The height of a capital letter.

rotation double

The angle of the baseline in radians.

widthFactor double

The width of a letter relative to its height's usual width; 1 is the font's own.

horizontal int

Where the point lies along the text: 0 left, 1 centre, 2 right.

vertical int

Where the point lies up the text: 0 baseline, 1 bottom, 2 middle, 3 top.

style DisplayStyle

How it is drawn.

handle string

The handle of the entity.

layer string

The layer.

fontName string

The font of its text style; null or empty for the canvas's own.

oblique double

How far the letters lean, in radians clockwise from upright.

backward bool

Whether it is drawn backwards: see IsBackward.