Initial Commit, can take in input a json config file

This commit is contained in:
2023-04-04 09:11:41 +02:00
commit 3bbb5e547b
27 changed files with 1525 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
namespace OCR_Decode
{
public class Window
{
private Rectangle _bounds;
private Bitmap _image;
private string _name;
public Rectangle Bounds { get => _bounds; private set => _bounds = value; }
public Bitmap Image { get => _image; private set => _image = value; }
public string Name { get => _name; set => _name = value; }
public Bitmap WindowImage
{
get
{
Bitmap sample = new Bitmap(Bounds.Width, Bounds.Height);
Graphics g = Graphics.FromImage(sample);
g.DrawImage(Image, new Rectangle(0, 0, sample.Width, sample.Height), Bounds, GraphicsUnit.Pixel);
return sample;
}
}
public Window(Bitmap image, Rectangle bounds)
{
Image = image;
Bounds = bounds;
}
}
}