Changes

Jump to: navigation, search

Drawing Graphics in C Sharp

4 bytes removed, 18:57, 30 January 2008
Drawing Squares and Rectangles in C#
== Drawing Squares and Rectangles in C# ==
For the purposes of drawing rectangles and squares in C# the GraphicsObject provides the ''DrawRectangle()'' method. There are two two ways to use the ''DrawRectangle()'' method. One is to pass through a ''Rectangle'' object and Pen and the other is to create an instance of a Rectangle object and pass that through along with the Pen. We will begin by looking at drawing a rectangle without a pre-created rectangle Rectangle object. The syntax for this is:
''graphicsobj''.DrawRectangle(''pen'', ''x'', ''y'', ''width'', ''height'');

Navigation menu