Difference between revisions of "TabulationTextStyle class"

From Catglobe Wiki
Jump to: navigation, search
Line 4: Line 4:
 
|InheritsFrom=object|Constructors=
 
|InheritsFrom=object|Constructors=
 
{{CGscriptConstructors_Template|Description=<nowiki>Create a new TabulationTextStyle</nowiki>}}
 
{{CGscriptConstructors_Template|Description=<nowiki>Create a new TabulationTextStyle</nowiki>}}
 +
{{CGscriptConstructors_Template|Parameters=
 +
{{CGscriptParameters_Template|Type=bool|Name=<nowiki>isDefault</nowiki>|Description=<nowiki>load default text style</nowiki>}}
 +
|Description=<nowiki>Create a default TabulationTextStyle</nowiki>}}
 
|Methods=
 
|Methods=
 +
{{CGscriptMethods_Template|ReturnType=TabulationTextStyle|Name=<nowiki>Clone</nowiki>|Description=<nowiki>Deep copy TabulationTextStyle object</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}}
 
|Properties=
 
|Properties=
Line 11: Line 15:
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>FontFace</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set FontFace of string.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>FontFace</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set FontFace of string.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>FontSize</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set FontSize of string in points.  Must be 1-400 points</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>FontSize</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set FontSize of string in points.  Must be 1-400 points</nowiki>}}
 +
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>IsInherit</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set IsInherit.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>Italic</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set Italic to string.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>Italic</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set Italic to string.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}

Revision as of 04:08, 5 May 2022

TabulationTextStyle



Styles for use on a portion of text

Parent class

Inherits from object

Constructors

  • () - Create a new TabulationTextStyle
  • (bool isDefault "load default text style") - Create a default TabulationTextStyle

Methods

  • TabulationTextStyle Clone() - Deep copy TabulationTextStyle object
  • (From object) 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 IsInherit { get; set; } - Get/Set IsInherit.
  • bool Italic { get; set; } - Get/Set Italic to string.
  • string ObjectTypeName { get; } - The name of the type of object.
  • (From 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 
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);