Interface IGlyphRenderer
A surface that can have a glyph renered to it as a series of actions.
Namespace: SixLabors.Fonts
Assembly: SixLabors.Fonts.dll
Syntax
public interface IGlyphRenderer
Methods
| Improve this Doc View SourceBeginFigure()
Begins the figure.
Declaration
void BeginFigure()
BeginGlyph(FontRectangle, GlyphRendererParameters)
Begins the glyph.
Declaration
bool BeginGlyph(FontRectangle bounds, GlyphRendererParameters paramaters)
Parameters
Type | Name | Description |
---|---|---|
FontRectangle | bounds | The bounds the glyph will be rendered at and at what size. |
GlyphRendererParameters | paramaters | The set of paramaters that uniquely represents a version of a glyph in at particular font size, font family, font style and DPI. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the glyph should be rendered othersie it returns false. |
BeginText(FontRectangle)
Called before any glyphs have been rendered.
Declaration
void BeginText(FontRectangle bounds)
Parameters
Type | Name | Description |
---|---|---|
FontRectangle | bounds | The bounds the text will be rendered at and at whats size. |
CubicBezierTo(Vector2, Vector2, Vector2)
Draw a Cubics bezier curve connecting the previous point to point
.
Declaration
void CubicBezierTo(Vector2 secondControlPoint, Vector2 thirdControlPoint, Vector2 point)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | secondControlPoint | The second control point. |
Vector2 | thirdControlPoint | The third control point. |
Vector2 | point | The point. |
EndFigure()
Ends the figure.
Declaration
void EndFigure()
EndGlyph()
Ends the glyph.
Declaration
void EndGlyph()
EndText()
Called once all glyphs have completed rendering
Declaration
void EndText()
LineTo(Vector2)
Draw a straight line connecting the previous point to point
.
Declaration
void LineTo(Vector2 point)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | point | The point. |
MoveTo(Vector2)
Sets a new start point to draw lines from
Declaration
void MoveTo(Vector2 point)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | point | The point. |
QuadraticBezierTo(Vector2, Vector2)
Draw a quadratic bezier curve connecting the previous point to point
.
Declaration
void QuadraticBezierTo(Vector2 secondControlPoint, Vector2 point)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | secondControlPoint | The second control point. |
Vector2 | point | The point. |