Public classes
Controller
DisplayModel
DotMatrix
ImageToContent
TextToContent
Commands/
AbsCmd
AbsCmdPosition
AbsCmdSpeed
CallbackCommand
ClearCommand
ContentCommand
PauseCommand
TextCommand
Displays/
Display
DisplayObj
Display_3D
Display_Sprite
Display_Texture
Display_UI
Introduction page
|
TextToContent
Static class that can be used to convert text (string) to content (two dimensional int array) that can be used as input for DotMatrix display..
Note that this class is normally used just internally by TextCommand and in most cases it is better to just use TextCommand directly. If this class is used to convert text to content, resulting content must be added to display using DisplayModel or ContentCommand. This however gives much more freedom where to put text on display, or gives possibility to make changes to resulting content before using it.
Static Methods
public static int[,] getContent (string textLine, TextCommand.Fonts font, bool fixedWidth, bool bold, int charSpacing) | Change line of text (string) to int[,] content. | public static int[,] getContent (string[] textLines, TextCommand.Fonts font, bool fixedWidth, bool bold, int textColor, int backColor, int charSpacing, int lineSpacing, TextCommand.TextAlignments multiLineTextAlignment) | Change multiple lines of text (string) to int content. |
Static Methods
public static int[,] getContent (string textLine, TextCommand.Fonts font, bool fixedWidth, bool bold, int charSpacing) Change line of text (string) to int[,] content. Parameters | textLine | Text to convert. If text contains linefeed characters, it will split text to multiple rows and default line spacing and text alignment will be used. | | font | Font to be used to generate content, one of the values from enum TextCommand.Fonts | | fixedWidth | If true, all the characters takes same amount of space. If false, different characters may take different amount of horizontal space. | | bold | If true, resulting text characters are bold. If false, then using normal characters. | | charSpacing | Amount of dots between each character. |
Returns | Two dimensional int array defining states of dots on each row and column. |
public static int[,] getContent (string[] textLines, TextCommand.Fonts font, bool fixedWidth, bool bold, int textColor, int backColor, int charSpacing, int lineSpacing, TextCommand.TextAlignments multiLineTextAlignment) Change multiple lines of text (string) to int content. Parameters | textLines | One of more lines of text. | | font | Font to be used to generate content, one of the values from enum TextCommand.Fonts | | fixedWidth | If true, all the characters takes same amount of space. If false, different characters may take different amount of horizontal space. | | bold | If true, resulting text characters are bold. If false, then using normal characters. | | textColor | Color used for any dots that should be on. | | backColor | Color used for any dots that should be off. | | charSpacing | Amount of dots between each character. | | lineSpacing | Amount of dots between each line if there is multiple lines of text. | | multiLineTextAlignment | Text alignment in case there is multiple lines of text, one of the values from enum TextCommand.TextAlignments |
Returns | Two dimensional int array defining states of dots on each row and column. |
|