How can I draw a rectangle on a drawingarea in Mono, GTK#?? I dont want to draw it using the mouse. Thus, I want to do the following but I do not know the right syntax:
int X = 10;
int Y = 10;
int SizeW = 10;
int SizeH = 10;
Drawingarea.DrawRectangle(x,y, SizeW, SizeH);
I figured it out.
Step 1. Create an eventbox and change the size of the eventbox.
Step 2. Add an imagewidget (without an image) inside the eventbox.
Step 3. Decide on a color or add a Colorbutton to determinecolor.
Step 4. Create a function as the following: