Updated Guide (markdown)

Stone_Red
2021-09-15 18:53:05 +02:00
parent 97f01de45f
commit f2e10b940c
+6 -6
@@ -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.