Class UnderlineCode
- Namespace
- MLEM.Formatting.Codes
- Assembly
- MLEM.dll
An instance of a formatting code that can be used for a TextFormatter. To add a new formatting code, see Codes
public class UnderlineCode : Code, IGenericDataHolder
- Inheritance
-
UnderlineCode
- Implements
- Derived
- Inherited Members
Constructors
UnderlineCode(Match, Regex, float, float)
public UnderlineCode(Match match, Regex regex, float thickness, float yOffset)
Parameters
Methods
DrawCharacter(GameTime, SpriteBatch, int, string, Token, int, Vector2, ref Vector2, GenericFont, ref Color, ref Vector2, ref float, ref Vector2, float, SpriteEffects, Vector2, Vector2)
Draws a given code point using this token's formatting options.
public override bool DrawCharacter(GameTime time, SpriteBatch batch, int codePoint, string character, Token token, int indexInToken, Vector2 stringPos, ref Vector2 charPosOffset, GenericFont font, ref Color color, ref Vector2 scale, ref float rotation, ref Vector2 origin, float depth, SpriteEffects effects, Vector2 stringSize, Vector2 charSize)
Parameters
time
GameTimeThe time
batch
SpriteBatchThe sprite batch to use
codePoint
intThe code point of the character to draw
character
stringThe string representation of the character to draw
token
TokenindexInToken
intThe index within this token that the character is at
stringPos
Vector2The position the string is drawn at.
charPosOffset
Vector2The offset from the
stringPos
that the current character is drawn at.font
GenericFontThe font to use to draw
color
ColorThe color to draw with
scale
Vector2The scale to draw with.
rotation
floatThe rotation to draw with.
origin
Vector2The origin to subtract from the position.
depth
floatThe depth to draw at
effects
SpriteEffectsThe flipping to draw with.
stringSize
Vector2The size of the string.
charSize
Vector2The size of the current character.