TextRenderer
Declaration
public class Strawberry.Graphics.Text.TextRenderer
Constructors
TextRenderer
void TextRenderer(Font font, string text, bool forcePersianDigits)
Parameters:
| Name | Type | Description |
|---|---|---|
font |
Strawberry.Graphics.Text.Font |
|
text |
System.String |
|
forcePersianDigits |
System.Boolean |
Properties
Text
string Text { get set }
Font
Font Font { get set }
ForcePersianDigits
bool ForcePersianDigits { get set }
Methods
Draw static
void Draw(SpriteLayer layer, Font font, string text, Vector2 position, Color color, TextAlign allign, TextDirection direction, bool forcePersianDigits)
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
Strawberry.Graphics.Layers.SpriteLayer |
|
font |
Strawberry.Graphics.Text.Font |
|
text |
System.String |
|
position |
Strawberry.Math.Vector2 |
|
color |
Strawberry.Graphics.Color |
|
allign |
Strawberry.Graphics.Text.TextAlign |
|
direction |
Strawberry.Graphics.Text.TextDirection |
|
forcePersianDigits |
System.Boolean |
Draw static
void Draw(SpriteLayer layer, Font font, string text, Vector2 position, Color color, TextAlign allign, TextDirection direction, bool forcePersianDigits, float size)
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
Strawberry.Graphics.Layers.SpriteLayer |
|
font |
Strawberry.Graphics.Text.Font |
|
text |
System.String |
|
position |
Strawberry.Math.Vector2 |
|
color |
Strawberry.Graphics.Color |
|
allign |
Strawberry.Graphics.Text.TextAlign |
|
direction |
Strawberry.Graphics.Text.TextDirection |
|
forcePersianDigits |
System.Boolean |
|
size |
System.Single |
GetStringWidth static
float GetStringWidth(string text, Font font, bool forcePersianDigits, float size)
Parameters:
| Name | Type | Description |
|---|---|---|
text |
System.String |
|
font |
Strawberry.Graphics.Text.Font |
|
forcePersianDigits |
System.Boolean |
|
size |
System.Single |