From f2e10b940c8223877fc9714e58d3904656a5c94c Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Wed, 15 Sep 2021 18:53:05 +0200 Subject: [PATCH] Updated Guide (markdown) --- Guide.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Guide.md b/Guide.md index b40b439..2b6fd68 100644 --- a/Guide.md +++ b/Guide.md @@ -51,6 +51,8 @@ namespace DesktopMagicPlugin g.DrawStringFixedWidth("Hello", new Font(Application.Font, 100), Brushes.Black, new PointF(0, 0), 120); //Draw the "Hello" to the image. } + bmp.SetResolution(300, 300); //Set DPI to avoid scaling issues. + return bmp; //Return the image. } } @@ -62,12 +64,6 @@ namespace DesktopMagicPlugin In this example, the user can enter a string that will be displayed on the image. ```cs -using DesktopMagicPluginAPI; -using DesktopMagicPluginAPI.Inputs; -using DesktopMagicPluginAPI.Drawing; -using System.Diagnostics; -using System.Drawing; - using DesktopMagicPluginAPI; using DesktopMagicPluginAPI.Inputs; using DesktopMagicPluginAPI.Drawing; @@ -103,8 +99,12 @@ namespace DesktopMagicPlugin g.DrawStringFixedWidth(textBox.Value, new Font(Application.Font, 100), Brushes.Black, new PointF(0, 0), 120); //Draw the value of the text box to the image. } + bmp.SetResolution(300, 300); //Set DPI to avoid scaling issues. + return bmp; //Return the image. } } } ``` + +> Tip: Use `Bitmap.SetResolution` to avoid scaling problems on different screens. \ No newline at end of file