05. Rec (Rectangle)
Rec class
Sometime you just need to draw a rectangle filled with a color inside, it's pretty useful to show a message, or for any reason and believe me you'll need it a lot of time.
Let's take a look to the constructors.
There’s 2 overloads, an empty one, and another one with 6 parameters (Brush, Point, Size, Name, TypeGfx, Visible)
Brush is the color of the rectangle
Point
Size
Name
TypeGfx
Visible : to identify object as it's type if is it a background or Object or Top
Rec box1 = new Rec(Brushes.Red, new Point(100, 100), new Size(80, 80), "box1", Manager.TypeGfx.Background, true, manager);
manager.BackgroundLayer.Add(box1);
You can add a border of the rectangle.
Rec box1 = new Rec(Brushes.Red, new Point(100, 100), new Size(80, 80), "box1", Manager.TypeGfx.Background, true, manager);
box1.BorderColor = Color.Black;
box1.BorderWidth = 2;
manager.BackgroundLayer.Add(box1);
Want me to dev an app for you ? dont hesitate to contact me.
Are you looking for a coder/teammate for your project ? Let's give it a try.
Have a proposal for me ? we can discuss about it.
You want to buy me a coffe ? m.elharfi@gmail.com