var text = Cx.Text({
text: 'Hello world!',
fontSize: 50
});
Properties |
Type |
Def |
Definition |
text |
String |
'Text' |
Figure text as a single string (with \n for multiline) |
lines |
String Array |
['Text'] |
Figure text lines |
font |
Font |
Arial |
Font |
fontSize |
Number |
54.2 |
Font size |
fontAutoSize |
Boolean |
true |
Size is adjusted using the M height |
lineDirection |
Angle |
0 |
Direction of the text line |
charDirection |
Angle |
90 |
Direction of each chararacters |
verticalStyle |
*String’ |
SingleLine |
Options: SingleLine , MultiLine |
extraCharSpacing |
Magnitude |
'0' |
Extra space between characters |
extraWordSpacing |
Magnitude |
'0' |
Extra space between words |
extraLineSpacing |
Magnitude |
'0' |
Extra space between lines |
columnSpacing |
Magnitude |
'0' |
Column spacing |
columnCount |
Integer |
1 |
Number of columns |
linesPerColumn |
Integer |
0 |
Lines per column, 0 is disabled |
linesAlign |
String |
'Center' |
Options: 'Left' , 'Center' , 'Right' |
fillMode |
String |
Winding |
Options: CadX , Winding , Alternate |
powerClipId |
String |
null |
Power clip content link |
textParts |
TextPart Array |
[] |
Text Part definition if mutli part |
Member Functions
text.isEmpty();
text.isMultiPart();
text.breakIntoParts();
text.addPowerClipContents(figures);
Multi Part Text
var range = Cx.TextRange({ start: 1, end: 0 });
range.slice(text);
range.clone();
range.isEqual(other);
var part = Cx.TextPart({ textRange: range, ... text properties ... });
part.clone();
Cx.Figure.autoCreateMultiPartText$(figures) .then(function(multiPartText) { ...