From 5e82fc2ebf4fc5208d122414ae88d9dcd4a08fbf Mon Sep 17 00:00:00 2001 From: valentinbreiz Date: Fri, 10 Jul 2020 03:04:23 +0200 Subject: [PATCH] add documentation for DrawString and DrawChar methods --- source/Cosmos.System2/Graphics/Canvas.cs | 35 ++++++++++++++++++++ source/Cosmos.System2/Graphics/Fonts/Font.cs | 1 - 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/source/Cosmos.System2/Graphics/Canvas.cs b/source/Cosmos.System2/Graphics/Canvas.cs index c0c3f6126..458cd8ca7 100644 --- a/source/Cosmos.System2/Graphics/Canvas.cs +++ b/source/Cosmos.System2/Graphics/Canvas.cs @@ -868,11 +868,26 @@ namespace Cosmos.System.Graphics DrawImage(image, point.X, point.Y); } + /// + /// Draw string. + /// + /// string to draw. + /// Font used. + /// Color. + /// Point of the top left corner of the string. public void DrawString(string str, Font aFont, Pen pen, Point point) { DrawString(str, aFont, pen, point.X, point.Y); } + /// + /// Draw string. + /// + /// string to draw. + /// Font used. + /// Color. + /// X coordinate. + /// Y coordinate. 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 } } + /// + /// Draw string. + /// + /// char to draw. + /// Font used. + /// Color. + /// Point of the top left corner of the char. + public void DrawChar(char c, Font aFont, Pen pen, Point point) + { + DrawChar(c, aFont, pen, point.X, point.Y); + } + + /// + /// Draw char. + /// + /// char to draw. + /// Font used. + /// Color. + /// X coordinate. + /// Y coordinate. public void DrawChar(char c, Font aFont, Pen pen, int x, int y) { int p = aFont.Height * (byte)c; diff --git a/source/Cosmos.System2/Graphics/Fonts/Font.cs b/source/Cosmos.System2/Graphics/Fonts/Font.cs index 726605ff2..90668cd9b 100644 --- a/source/Cosmos.System2/Graphics/Fonts/Font.cs +++ b/source/Cosmos.System2/Graphics/Fonts/Font.cs @@ -9,7 +9,6 @@ namespace Cosmos.System.Graphics.Fonts /// public abstract class Font { - /// /// Get font pure data. ///