mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 08:56:15 +02:00
Updated Guide (markdown)
+2
-4
@@ -34,7 +34,6 @@ This is a very basic plugin that will display a constant string.
|
||||
|
||||
```cs
|
||||
using DesktopMagicPluginAPI;
|
||||
using DesktopMagicPluginAPI.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
|
||||
@@ -50,7 +49,7 @@ namespace DesktopMagicPlugin
|
||||
{
|
||||
g.Clear(Application.Color); //Set the background color to the color specified in the Desktop Magic application.
|
||||
|
||||
g.DrawStringFixedWidth("Hello", new Font(Application.Font, 100), Brushes.Black, new PointF(0, 0), 120); //Draw the "Hello" to the image.
|
||||
g.DrawString("Hello", new Font(Application.Font, 100), Brushes.Black, new PointF(0, 0)); //Draw the "Hello" to the image.
|
||||
}
|
||||
|
||||
bmp.SetResolution(300, 300); //Set DPI to avoid scaling issues.
|
||||
@@ -68,7 +67,6 @@ 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.Drawing;
|
||||
|
||||
namespace DesktopMagicPlugin
|
||||
@@ -98,7 +96,7 @@ namespace DesktopMagicPlugin
|
||||
{
|
||||
g.Clear(Application.Color); //Set the background color to the color specified in the Desktop Magic application.
|
||||
|
||||
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.
|
||||
g.DrawString(textBox.Value, new Font(Application.Font, 100), Brushes.Black, new PointF(0, 0)); //Draw the value of the text box to the image.
|
||||
}
|
||||
|
||||
bmp.SetResolution(300, 300); //Set DPI to avoid scaling issues.
|
||||
|
||||
Reference in New Issue
Block a user