mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-22 05:48:37 +00:00
add documentation for DrawString and DrawChar methods
This commit is contained in:
parent
8c8f6edaa4
commit
5e82fc2ebf
2 changed files with 35 additions and 1 deletions
|
|
@ -868,11 +868,26 @@ namespace Cosmos.System.Graphics
|
|||
DrawImage(image, point.X, point.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draw string.
|
||||
/// </summary>
|
||||
/// <param name="str">string to draw.</param>
|
||||
/// <param name="aFont">Font used.</param>
|
||||
/// <param name="pen">Color.</param>
|
||||
/// <param name="point">Point of the top left corner of the string.</param>
|
||||
public void DrawString(string str, Font aFont, Pen pen, Point point)
|
||||
{
|
||||
DrawString(str, aFont, pen, point.X, point.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draw string.
|
||||
/// </summary>
|
||||
/// <param name="str">string to draw.</param>
|
||||
/// <param name="aFont">Font used.</param>
|
||||
/// <param name="pen">Color.</param>
|
||||
/// <param name="x">X coordinate.</param>
|
||||
/// <param name="y">Y coordinate.</param>
|
||||
public void DrawString(string str, Font aFont, Pen pen, int x, int y)
|
||||
{
|
||||
foreach (char c in str)
|
||||
|
|
@ -882,6 +897,26 @@ namespace Cosmos.System.Graphics
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draw string.
|
||||
/// </summary>
|
||||
/// <param name="str">char to draw.</param>
|
||||
/// <param name="aFont">Font used.</param>
|
||||
/// <param name="pen">Color.</param>
|
||||
/// <param name="point">Point of the top left corner of the char.</param>
|
||||
public void DrawChar(char c, Font aFont, Pen pen, Point point)
|
||||
{
|
||||
DrawChar(c, aFont, pen, point.X, point.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draw char.
|
||||
/// </summary>
|
||||
/// <param name="str">char to draw.</param>
|
||||
/// <param name="aFont">Font used.</param>
|
||||
/// <param name="pen">Color.</param>
|
||||
/// <param name="x">X coordinate.</param>
|
||||
/// <param name="y">Y coordinate.</param>
|
||||
public void DrawChar(char c, Font aFont, Pen pen, int x, int y)
|
||||
{
|
||||
int p = aFont.Height * (byte)c;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ namespace Cosmos.System.Graphics.Fonts
|
|||
/// </summary>
|
||||
public abstract class Font
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Get font pure data.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue