Click to See Complete Forum and Search --> : Drawing Help Request


lanef
August 22nd, 2009, 08:40 PM
Hi,

I'm learning drawing with C#. When I draw a rectangle and fill it, ala
g.DrawRectangle (Pens.Black, testRectangle);
Brush test = new HatchBrush(...);
g.FillRectangle(test, testRectangle);

The top and left-hand border of my rectangle be quashed by the hatch marks. Am I doing something wrong? Please tell me what it is?

Thanks for your time and attention,
Frank

BigEd781
August 22nd, 2009, 08:54 PM
You are filling over the border since you are drawing to the same rectangle. Think about it for a minute and it makes sense. Just fill it in first and then draw the border.