This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ImageSharp; | |
using System; | |
using System.Diagnostics; | |
using System.Drawing; | |
using System.IO; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void DrawText(Graphics graphics) | |
{ | |
using(Font font = new Font("Arial", 20, FontStyle.Regular, GraphicsUnit.Pixel)) | |
{ | |
// draw string as text without transformation | |
using(Brush brush = new SolidBrush(Color.Blue)) | |
graphics.DrawString("Draw as text without transformation", font, brush, new PointF(10,10)); | |
// draw string as text with transformation | |
GraphicsContainer container = graphics.BeginContainer(); |