Now its responsive
This commit is contained in:
@@ -19,22 +19,17 @@ namespace Caisses
|
||||
public Color Color { get => _color; set => _color = value; }
|
||||
public Size Size { get => _size; set => _size = value; }
|
||||
public Rectangle Area { get => _area; set => _area = value; }
|
||||
public GraphicalCheckout(Point position,Rectangle area,int checkoutNumber)
|
||||
public GraphicalCheckout()
|
||||
{
|
||||
Random = new Random();
|
||||
Position = position;
|
||||
Color = Color.FromArgb(Random.Next(0, 255), Random.Next(0, 255), Random.Next(0, 255));
|
||||
Size = new Size(area.Width / checkoutNumber + 1,area.Height-area.Height/10);
|
||||
}
|
||||
public void Draw(Bitmap checkoutAreaImage)
|
||||
public void Draw(Bitmap checkoutAreaImage,int checkoutNumber, int checkoutId)
|
||||
{
|
||||
Size = new Size(checkoutAreaImage.Width / checkoutNumber + 1, checkoutAreaImage.Height - checkoutAreaImage.Height / 20);
|
||||
Position = new Point(checkoutId * Size.Width, 0);
|
||||
int radius = Math.Min(Size.Width, Size.Height / MAX_CAPACITY);
|
||||
Size clientSize = new Size(radius,radius);
|
||||
int xOffset = Size.Width / 2 - radius / 2;
|
||||
Graphics g = Graphics.FromImage(checkoutAreaImage);
|
||||
|
||||
|
||||
|
||||
|
||||
//g.DrawRectangle(new Pen(Color.FromArgb(Random.Next(0,255),Random.Next(0,255),Random.Next(0,255))),new Rectangle(Position,Size));
|
||||
g.DrawRectangle(new Pen(Color.Black),new Rectangle(Position,Size));
|
||||
|
||||
Reference in New Issue
Block a user