Public Member Functions | |
| FontSurface (string fontFamily, float sizeInPoints) | |
| Creates a FontSurface object from the given fontFamily. | |
| FontSurface (string fontFamily, float sizeInPoints, FontStyle style) | |
| Creates a FontSurface object from the given fontFamily. | |
| void | Dispose () |
| Disposes of this object. | |
| void | SetScale (double x, double y) |
| Sets the scale of the font. | |
| void | GetScale (out double x, out double y) |
| Gets the scale of the font. | |
| int | StringDisplayWidth (string text) |
| Measures the display width of the specified string. | |
| int | StringDisplayHeight (string text) |
| Measures the display height of the specified string. | |
| Size | StringDisplaySize (string text) |
| Measures the display size of the specified string. | |
| void | DrawText (int destX, int destY, string text) |
| Draws the specified string at the specified location. | |
| void | DrawText (double destX, double destY, string text) |
| Draws the specified string at the specified location. | |
| void | DrawText (Point destPt, string text) |
| Draws the specified string at the specified location. | |
| void | DrawText (PointF destPt, string text) |
| Draws the specified string at the specified location. | |
| void | DrawText (string text) |
| Draws the specified string at the origin. | |
Static Public Member Functions | |
| static FontSurface | BitmapMonospace (string filename, Size characterSize) |
| This function loads a monospace bitmap font from the specified image file. Only the character size is given. It is assumed that all ASCII characters from 0 to 255 are present, in order from left to right, and top to bottom. | |
| static FontSurface | BitmapFont (string fontFamily, float sizeInPoints) |
| This function creates a font from the specified font family by loading it with System.Drawing and creating a texture from the characters. | |
| static FontSurface | BitmapFont (string fontFamily, float sizeInPoints, FontStyle style) |
| This function creates a font from the specified font family by loading it with System.Drawing and creating a texture from the characters. | |
Properties | |
| StringTransformer | StringTransformer [get, set] |
| Gets or sets how strings are transformed when they are drawn to the screen. This is useful for bitmap fonts which contain only all uppercase letters, for example. | |
| OriginAlignment | DisplayAlignment [get, set] |
| Sets the interpretation of the draw point used. | |
| Color | Color [get, set] |
| Sets the color of the font. | |
| double | Alpha [get, set] |
| Sets the transparency of the font. 0.0 is fully transparent 1.0 is completely opaque. | |
| double | ScaleWidth [get, set] |
| Gets or sets the amount the width is scaled when the text is drawn. 1.0 is no scaling. | |
| double | ScaleHeight [get, set] |
| Gets or sets the amount the height is scaled when the text is drawn. 1.0 is no scaling. | |
When creating a FontSurface, if you are going to be scaling the font, it usually looks much better to make a large font and scale it to a smaller size, rather than vice-versa.
| ERY.AgateLib.FontSurface.FontSurface | ( | string | fontFamily, | |
| float | sizeInPoints | |||
| ) |
| ERY.AgateLib.FontSurface.FontSurface | ( | string | fontFamily, | |
| float | sizeInPoints, | |||
| FontStyle | style | |||
| ) |
| static FontSurface ERY.AgateLib.FontSurface.BitmapMonospace | ( | string | filename, | |
| Size | characterSize | |||
| ) | [static] |
This function loads a monospace bitmap font from the specified image file. Only the character size is given. It is assumed that all ASCII characters from 0 to 255 are present, in order from left to right, and top to bottom.
[Experimental - The API is likely to change in the future.]
| filename | ||
| characterSize |
| static FontSurface ERY.AgateLib.FontSurface.BitmapFont | ( | string | fontFamily, | |
| float | sizeInPoints | |||
| ) | [static] |
This function creates a font from the specified font family by loading it with System.Drawing and creating a texture from the characters.
[Experimental - The API is likely to change in the future.]
| fontFamily | ||
| sizeInPoints |
| static FontSurface ERY.AgateLib.FontSurface.BitmapFont | ( | string | fontFamily, | |
| float | sizeInPoints, | |||
| FontStyle | style | |||
| ) | [static] |
This function creates a font from the specified font family by loading it with System.Drawing and creating a texture from the characters.
[Experimental - The API is likely to change in the future.]
| fontFamily | ||
| sizeInPoints | ||
| style |
| void ERY.AgateLib.FontSurface.Dispose | ( | ) |
Disposes of this object.
| void ERY.AgateLib.FontSurface.SetScale | ( | double | x, | |
| double | y | |||
| ) |
Sets the scale of the font.
| x | ||
| y |
| void ERY.AgateLib.FontSurface.GetScale | ( | out double | x, | |
| out double | y | |||
| ) |
Gets the scale of the font.
| x | ||
| y |
| int ERY.AgateLib.FontSurface.StringDisplayWidth | ( | string | text | ) |
Measures the display width of the specified string.
| text |
| int ERY.AgateLib.FontSurface.StringDisplayHeight | ( | string | text | ) |
Measures the display height of the specified string.
| text |
| Size ERY.AgateLib.FontSurface.StringDisplaySize | ( | string | text | ) |
Measures the display size of the specified string.
| text |
| void ERY.AgateLib.FontSurface.DrawText | ( | int | destX, | |
| int | destY, | |||
| string | text | |||
| ) |
Draws the specified string at the specified location.
| destX | ||
| destY | ||
| text |
| void ERY.AgateLib.FontSurface.DrawText | ( | double | destX, | |
| double | destY, | |||
| string | text | |||
| ) |
Draws the specified string at the specified location.
| destX | ||
| destY | ||
| text |
| void ERY.AgateLib.FontSurface.DrawText | ( | Point | destPt, | |
| string | text | |||
| ) |
Draws the specified string at the specified location.
| destPt | ||
| text |
| void ERY.AgateLib.FontSurface.DrawText | ( | PointF | destPt, | |
| string | text | |||
| ) |
Draws the specified string at the specified location.
| destPt | ||
| text |
| void ERY.AgateLib.FontSurface.DrawText | ( | string | text | ) |
Draws the specified string at the origin.
| text |
StringTransformer ERY.AgateLib.FontSurface.StringTransformer [get, set] |
Gets or sets how strings are transformed when they are drawn to the screen. This is useful for bitmap fonts which contain only all uppercase letters, for example.
OriginAlignment ERY.AgateLib.FontSurface.DisplayAlignment [get, set] |
Sets the interpretation of the draw point used.
Color ERY.AgateLib.FontSurface.Color [get, set] |
Sets the color of the font.
double ERY.AgateLib.FontSurface.Alpha [get, set] |
Sets the transparency of the font. 0.0 is fully transparent 1.0 is completely opaque.
double ERY.AgateLib.FontSurface.ScaleWidth [get, set] |
Gets or sets the amount the width is scaled when the text is drawn. 1.0 is no scaling.
double ERY.AgateLib.FontSurface.ScaleHeight [get, set] |
Gets or sets the amount the height is scaled when the text is drawn. 1.0 is no scaling.
|
AgateLib Awesome Game and Tool Engine Library |
|