complete project with 4x4 table function
This commit is contained in:
parent
ae3370ac44
commit
9cb42200f3
130 changed files with 3706 additions and 2 deletions
34
Chaser/ChaserLibrary/PainterWinform.cs
Normal file
34
Chaser/ChaserLibrary/PainterWinform.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ChaserLibrary
|
||||
{
|
||||
public class PainterWinform : IPaintable
|
||||
{
|
||||
Graphics PainterG { get; set; }
|
||||
static Pen PenG { get; set; } = new Pen(Color.Black);
|
||||
|
||||
public PainterWinform(Graphics painterG)
|
||||
{
|
||||
PainterG = painterG;
|
||||
}
|
||||
|
||||
public void PaintCircle(double X, double Y, int radius)
|
||||
{
|
||||
PainterG.DrawEllipse(PenG, new Rectangle((int) X, (int) Y, radius, radius));
|
||||
}
|
||||
|
||||
public void PaintCross(double X, double Y)
|
||||
{
|
||||
int x = (int) X;
|
||||
int y = (int) Y;
|
||||
PainterG.DrawLine(PenG, x - 5, y - 5, x + 5, y + 5);
|
||||
PainterG.DrawLine(PenG, x + 5, y - 5, x - 5, y + 5);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue