Programming Examples

Are you a Programmer or Application Developer or a DBA? Take a cup of coffee, sit back and spend few minutes here :)

Tag Archive for ‘HatchStyle’

Drawing Shapes Via GDI+ Brushes and Pens

DotNet GDI Plus Pen and Brush Example

A ‘Pen’ is a graphic object, which can be used to perform line drawing. GDI Pen has the properties like the color of the Pen and thickness of the pen. A Brush is also a graphic object, which we can use to paint a region. Suppose if we want to fill the area of a closed shape, we can use the Brush. One can think about Painting a door, a wooden plate, etc. In this example, we will explore how to use the ‘Pen’ and ‘Brush’. In the brush part, we will look at ‘Plain Solid Brush’, ‘Gradient Brush’ and ‘Hatch brush’.

In this example, we will explore about the GDI+ Pen and Brushes and use them to draw some shapes in the window’s form.

Continue Reading →