Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

TabulationTextStyle class: Difference between revisions

From Catglobe Wiki
Nguyenduyan (talk | contribs)
No edit summary
Nguyenduyan (talk | contribs)
No edit summary
Line 16: Line 16:
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>Underline</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set Underline to string.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>Underline</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set Underline to string.</nowiki>}}
}}
}}
Relevant classes and function : TabulationParagraphStyle, TabulationParagraph, Tabulation_addParagraph


=== <span style="color:#DF8621">'''Examples'''</span> ===
=== <span style="color:#DF8621">'''Examples'''</span> ===


<source lang="javascript">
<source lang="javascript">
TabulationParagraphStyle paragraphStyle = new TabulationParagraphStyle();
paragraphStyle.Alignment = "center"; //left, right, center.
TabulationTextStyle textStyle = new TabulationTextStyle();
TabulationTextStyle textStyle = new TabulationTextStyle();
textStyle.Color = Color_getByName("red"); //Takes a color array-
textStyle.Color = Color_getByName("red"); //Takes a color array-
textStyle.Color = Color_getByRGB(0,0,0); // can also be set from rgb.
//textStyle.Color = Color_getByRGB(255,0,0); // can also be set from rgb.
//textStyle.Color = new Color("red",false); // can also be set by Color object
textStyle.FontFace = "Bariol Regular";
textStyle.FontFace = "Bariol Regular";
textStyle.FontSize = 40; //1-399
textStyle.FontSize = 40; //1-399
Line 28: Line 34:
textStyle.Italic = false;
textStyle.Italic = false;
textStyle.Underline = false;
textStyle.Underline = false;
TabulationParagraph paragraph = new TabulationParagraph(paragraphStyle);
paragraph.AddPortion("Some text", textStyle);
Tabulation_addParagraph(paragraph);
</source>
</source>

Revision as of 09:08, 18 July 2018

TabulationTextStyle



Styles for use on a portion of text

Constructors

  • () - Create a new TabulationTextStyle

Methods

  • string ToString() - The string representation of the object.

Properties

  • bool Bold { get; set; } - Get/Set Bold to string.
  • Color Color { get; set; } - Get/Set Color of string.
  • string FontFace { get; set; } - Get/Set FontFace of string.
  • int FontSize { get; set; } - Get/Set FontSize of string in points. Must be 1-400 points
  • bool Italic { get; set; } - Get/Set Italic to string.
  • string ObjectTypeName { get; } - The name of the type of object.
  • TypeInformation TypeInformation { get; } - Get information about this class.
  • bool Underline { get; set; } - Get/Set Underline to string.


Relevant classes and function : TabulationParagraphStyle, TabulationParagraph, Tabulation_addParagraph

Examples

TabulationParagraphStyle paragraphStyle = new TabulationParagraphStyle();
paragraphStyle.Alignment = "center"; //left, right, center.

TabulationTextStyle textStyle = new TabulationTextStyle();
textStyle.Color = Color_getByName("red"); //Takes a color array-
//textStyle.Color = Color_getByRGB(255,0,0); // can also be set from rgb.
//textStyle.Color = new Color("red",false); // can also be set by Color object
textStyle.FontFace = "Bariol Regular";
textStyle.FontSize = 40; //1-399
textStyle.Bold = false;
textStyle.Italic = false;
textStyle.Underline = false;

TabulationParagraph paragraph = new TabulationParagraph(paragraphStyle);
paragraph.AddPortion("Some text", textStyle);

Tabulation_addParagraph(paragraph);