PixelTextExtensionMethods

public static class PixelTextExtensionMethods
Provides extension methods for the Eto graphics object.

Methods

DrawPixelChar

#Example
public static void DrawPixelChar(this Graphics graphics, char c, Pen edge, float x, float y)
Draw a single pixel character.
graphics (Graphics)Graphics object to draw with.
c (char)Char to draw.
edge (Pen)Pen to use. Should ideally have a width of 2 logical pixels and round caps/joins.
x (float)X of left edge of character.
y (float)Y of base line elevation.

DrawPixelDigit

#Example
public static void DrawPixelDigit(this Graphics graphics, char c, Pen edge, float x, float y)
graphics (Graphics)
c (char)
edge (Pen)
x (float)
y (float)

DrawPixelSymbol

#Example
public static void DrawPixelSymbol(this Graphics graphics, char c, Pen edge, float x, float y)
graphics (Graphics)
c (char)
edge (Pen)
x (float)
y (float)

DrawPixelText

#Example
public static void DrawPixelText(this Graphics graphics, string text, Color colour, PointF anchor)
Draw a pixel string.
graphics (Graphics)
text (string)
colour (Color)
anchor (PointF)

MeasurePixelText

#Example
public static SizeF MeasurePixelText(this Graphics graphics, string text)
Measure the width and height of a pixel string.
graphics (Graphics)
text (string)

PixelCharHeight

#
public static float PixelCharHeight(char a)
Gets the height of the bounding box of a char. Note that at this moment this function always returns 12, regardless of the char. Maybe one day I'll add a descender and ascender method, but today is not that day.
a (char)

PixelCharWidth

#
public static float PixelCharWidth(char a)
Gets the width of the bounding box of a char.
a (char)

PixelStringWidth

#
public static float PixelStringWidth(string text)
Measure the width of a string. This includes all known characters, spacing and kerning.
text (string)