Logo
Public Types | Public Member Functions | List of all members
Yukar.Engine.TextDrawer Class Reference

String drawing class for general use It's easier to use with the Graphics.DrawString family of methods, so it's usually recommended to use them. More...

Public Types

enum  HorizontalAlignment { Left , Right , Center }
 Parallel setting More...
 
enum  VerticalAlignment { Top , Bottom , Center }
 Vertical setting More...
 

Public Member Functions

 TextDrawer (int fontId=0)
 
void Update ()
 
void DrawStringSoloColor (string text, Vector2 position, Color color, int zOrder=0)
 
void DrawStringSoloColor (string text, Vector2 position, Color color, float scale, int zOrder=0)
 
void DrawString (string text, Vector2 position, Color color, float scale, int zOrder, bool bold, bool italic, bool useOutline)
 
void DrawStringSoloColor (string text, Vector2 position, Color color, bool useClip, float scale=1.0f, int zOrder=0)
 
void DrawStringSoloColor (string text, Vector2 position, Color color, bool useClip, float scale, int zOrder, bool bold, bool italic)
 
void DrawStringSoloColor (SharpKmyGfx.Font font, string text, Vector2 position, Color color, int zOrder=0)
 
void DrawStringSoloColor (SharpKmyGfx.Font font, string text, Vector2 position, Color color, float scale, int zOrder=0)
 
void DrawStringSoloColor (SharpKmyGfx.Font font, string text, Vector2 position, Color color, float scale, int zOrder, bool bold, bool italic)
 
void DrawStringSoloColor (SharpKmyGfx.Font font, string text, Vector2 position, Color color, bool useClip, float scale=1.0f, int zOrder=0)
 
void DrawStringSoloColor (SharpKmyGfx.Font font, string text, Vector2 position, Color color, bool useClip, float scale, int zOrder, bool bold, bool italic)
 
void DrawStringSoloColor (string text, Vector2 position, int width, HorizontalAlignment alignment, Color color, float scale=1.0f)
 
void DrawStringSoloColor (string text, Vector2 position, int height, VerticalAlignment alignment, Color color, float scale=1.0f)
 
void DrawStringSoloColor (string text, Vector2 position, int height, VerticalAlignment alignment, Color color, bool useClip, float scale=1.0f)
 
void DrawStringSoloColor (string text, Vector2 position, HorizontalAlignment alignment, Color color)
 
void DrawStringSoloColor (string text, Vector2 position, int width, HorizontalAlignment alignment, Color color, bool useClip, float scale=1.0f)
 
void DrawStringSoloColor (string text, Vector2 position, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, float scale=1.0f, int zOrder=0)
 
void DrawStringSoloColor (string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, float scale=1.0f)
 
void DrawStringSoloColor (SharpKmyGfx.Font font, string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, float scale=1.0f)
 
void DrawStringSoloColor (SharpKmyGfx.Font font, string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, float scale, bool bold, bool italic)
 
void DrawStringSoloColor (SharpKmyGfx.Font font, string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, bool useClip, float scale=1.0f)
 
void DrawStringSoloColor (SharpKmyGfx.Font font, string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, bool useClip, float scale, bool bold, bool italic)
 
void DrawStringSoloColor (string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, bool useClip, float scale=1.0f)
 
void DrawString (string text, Vector2 position, Color color, int zOrder=0)
 
void DrawString (string text, Vector2 position, Color color, bool useClip, float scale=1.0f, int zOrder=0)
 
void DrawString (SharpKmyGfx.Font font, string text, Vector2 position, Color color, int zOrder=0)
 
void DrawString (SharpKmyGfx.Font font, string text, Vector2 position, Color color, float scale, int zOrder=0)
 
void DrawString (SharpKmyGfx.Font font, string text, Vector2 position, Color color, bool useClip, float scale, int zOrder=0)
 
void DrawString (string text, Vector2 position, HorizontalAlignment alignment, Color color)
 
void DrawString (string text, Vector2 position, VerticalAlignment alignment, Color color)
 
void DrawString (string text, Vector2 position, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, float scale=1.0f)
 
void DrawString (string text, Vector2 position, int width, HorizontalAlignment alignment, Color color, float scale=1.0f)
 
void DrawString (string text, Vector2 position, int width, HorizontalAlignment alignment, Color color, bool useClip, float scale=1.0f)
 
void DrawString (string text, Vector2 position, int height, VerticalAlignment alignment, Color color, float scale=1.0f)
 
void DrawString (string text, Vector2 position, int height, VerticalAlignment alignment, Color color, bool useClip, float scale=1.0f)
 
void DrawString (string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, float scale=1.0f)
 
void DrawString (string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, bool useClip, float scale=1.0f)
 
void DrawString (SharpKmyGfx.Font font, string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, float scale=1.0f)
 
void DrawString (SharpKmyGfx.Font font, string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, bool useClip, float scale=1.0f)
 
void DrawString (string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, Color color, float scale, int zOrder, bool bold, bool italic, bool useOutline)
 
void DrawString (string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, float scale, int zOrder, bool bold, bool italic, bool useOutline)
 
void DrawString (SharpKmyGfx.Font font, string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, float scale, int zOrder, bool bold, bool italic, bool useOutline)
 
void DrawString (SharpKmyGfx.Font font, string text, Vector2 position, Vector2 drawAreaSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, Color color, bool useClip, float scale, int zOrder, bool bold, bool italic, bool useOutline)
 
Vector2 MeasureString (string text)
 
Vector2 MeasureString (SharpKmyGfx.Font font, string text)
 
string[] SplitString (string text, int width, float scale=1.0f)
 

Detailed Description

String drawing class for general use It's easier to use with the Graphics.DrawString family of methods, so it's usually recommended to use them.

Member Enumeration Documentation

◆ HorizontalAlignment

Parallel setting

Enumerator
Left 
Right 
Center 

◆ VerticalAlignment

Vertical setting

Enumerator
Top 
Bottom 
Center 

Constructor & Destructor Documentation

◆ TextDrawer()

Yukar.Engine.TextDrawer.TextDrawer ( int  fontId = 0)

Member Function Documentation

◆ DrawString() [1/21]

void Yukar.Engine.TextDrawer.DrawString ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Color  color,
bool  useClip,
float  scale,
int  zOrder = 0 
)

◆ DrawString() [2/21]

void Yukar.Engine.TextDrawer.DrawString ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Color  color,
float  scale,
int  zOrder = 0 
)

◆ DrawString() [3/21]

void Yukar.Engine.TextDrawer.DrawString ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Color  color,
int  zOrder = 0 
)

◆ DrawString() [4/21]

void Yukar.Engine.TextDrawer.DrawString ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
bool  useClip,
float  scale,
int  zOrder,
bool  bold,
bool  italic,
bool  useOutline 
)

◆ DrawString() [5/21]

void Yukar.Engine.TextDrawer.DrawString ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
bool  useClip,
float  scale = 1.0f 
)

◆ DrawString() [6/21]

void Yukar.Engine.TextDrawer.DrawString ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
float  scale,
int  zOrder,
bool  bold,
bool  italic,
bool  useOutline 
)

◆ DrawString() [7/21]

void Yukar.Engine.TextDrawer.DrawString ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
float  scale = 1.0f 
)

◆ DrawString() [8/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
Color  color,
bool  useClip,
float  scale = 1.0f,
int  zOrder = 0 
)

◆ DrawString() [9/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
Color  color,
float  scale,
int  zOrder,
bool  bold,
bool  italic,
bool  useOutline 
)

◆ DrawString() [10/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
Color  color,
int  zOrder = 0 
)

◆ DrawString() [11/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
HorizontalAlignment  alignment,
Color  color 
)

◆ DrawString() [12/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
float  scale = 1.0f 
)

◆ DrawString() [13/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
int  height,
VerticalAlignment  alignment,
Color  color,
bool  useClip,
float  scale = 1.0f 
)

◆ DrawString() [14/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
int  height,
VerticalAlignment  alignment,
Color  color,
float  scale = 1.0f 
)

◆ DrawString() [15/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
int  width,
HorizontalAlignment  alignment,
Color  color,
bool  useClip,
float  scale = 1.0f 
)

◆ DrawString() [16/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
int  width,
HorizontalAlignment  alignment,
Color  color,
float  scale = 1.0f 
)

◆ DrawString() [17/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
Color  color,
float  scale,
int  zOrder,
bool  bold,
bool  italic,
bool  useOutline 
)

◆ DrawString() [18/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
bool  useClip,
float  scale = 1.0f 
)

◆ DrawString() [19/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
float  scale,
int  zOrder,
bool  bold,
bool  italic,
bool  useOutline 
)

◆ DrawString() [20/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
float  scale = 1.0f 
)

◆ DrawString() [21/21]

void Yukar.Engine.TextDrawer.DrawString ( string  text,
Vector2  position,
VerticalAlignment  alignment,
Color  color 
)

◆ DrawStringSoloColor() [1/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Color  color,
bool  useClip,
float  scale,
int  zOrder,
bool  bold,
bool  italic 
)

◆ DrawStringSoloColor() [2/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Color  color,
bool  useClip,
float  scale = 1.0f,
int  zOrder = 0 
)

◆ DrawStringSoloColor() [3/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Color  color,
float  scale,
int  zOrder,
bool  bold,
bool  italic 
)

◆ DrawStringSoloColor() [4/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Color  color,
float  scale,
int  zOrder = 0 
)

◆ DrawStringSoloColor() [5/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Color  color,
int  zOrder = 0 
)

◆ DrawStringSoloColor() [6/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
bool  useClip,
float  scale,
bool  bold,
bool  italic 
)

◆ DrawStringSoloColor() [7/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
bool  useClip,
float  scale = 1.0f 
)

◆ DrawStringSoloColor() [8/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
float  scale,
bool  bold,
bool  italic 
)

◆ DrawStringSoloColor() [9/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( SharpKmyGfx.Font  font,
string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
float  scale = 1.0f 
)

◆ DrawStringSoloColor() [10/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( string  text,
Vector2  position,
Color  color,
bool  useClip,
float  scale,
int  zOrder,
bool  bold,
bool  italic 
)

◆ DrawStringSoloColor() [11/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( string  text,
Vector2  position,
Color  color,
bool  useClip,
float  scale = 1.0f,
int  zOrder = 0 
)

◆ DrawStringSoloColor() [12/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( string  text,
Vector2  position,
Color  color,
float  scale,
int  zOrder = 0 
)

◆ DrawStringSoloColor() [13/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( string  text,
Vector2  position,
Color  color,
int  zOrder = 0 
)

◆ DrawStringSoloColor() [14/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( string  text,
Vector2  position,
HorizontalAlignment  alignment,
Color  color 
)

◆ DrawStringSoloColor() [15/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( string  text,
Vector2  position,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
float  scale = 1.0f,
int  zOrder = 0 
)

◆ DrawStringSoloColor() [16/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( string  text,
Vector2  position,
int  height,
VerticalAlignment  alignment,
Color  color,
bool  useClip,
float  scale = 1.0f 
)

◆ DrawStringSoloColor() [17/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( string  text,
Vector2  position,
int  height,
VerticalAlignment  alignment,
Color  color,
float  scale = 1.0f 
)

◆ DrawStringSoloColor() [18/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( string  text,
Vector2  position,
int  width,
HorizontalAlignment  alignment,
Color  color,
bool  useClip,
float  scale = 1.0f 
)

◆ DrawStringSoloColor() [19/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( string  text,
Vector2  position,
int  width,
HorizontalAlignment  alignment,
Color  color,
float  scale = 1.0f 
)

◆ DrawStringSoloColor() [20/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
bool  useClip,
float  scale = 1.0f 
)

◆ DrawStringSoloColor() [21/21]

void Yukar.Engine.TextDrawer.DrawStringSoloColor ( string  text,
Vector2  position,
Vector2  drawAreaSize,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
Color  color,
float  scale = 1.0f 
)

◆ MeasureString() [1/2]

Vector2 Yukar.Engine.TextDrawer.MeasureString ( SharpKmyGfx.Font  font,
string  text 
)

◆ MeasureString() [2/2]

Vector2 Yukar.Engine.TextDrawer.MeasureString ( string  text)

◆ SplitString()

string[] Yukar.Engine.TextDrawer.SplitString ( string  text,
int  width,
float  scale = 1.0f 
)

◆ Update()

void Yukar.Engine.TextDrawer.Update ( )