User-1991182345 posted
I'm having a couple problems when I use drawpath to outline objects (text specifically).
1) The outline draws on the path itself with the brush being in the center. So if I use a 5 pixel brush, 2 pixels are outside the path, 2 pixels are inside the path, and 1 pixel is on the path. I know this is how GDI+ works, but is there a way to draw on the
outside of the path (ala photoshop's stroke)?
2) Once again, I'm outlining text, and here's my scenario:
- Text is "Hello My Western Friends"
- Font is Arial Bold
- Size is 80 pixels
- Brush size is 6 pixels
My problem is on certain letters (M and W usually) I get collisions that create artifacts (the M will get horns).
My Code:
Bitmap _bitmap = new Bitmap(500, 200);
Image _image = (Image)_bitmap;
Graphics _graphics = Graphics.FromImage(_image);
GraphicsPath _path = new GraphicsPath();
_path.AddString("Hello My Western Friends", new System.Drawing.FontFamily("Arial"),
1, 80, new Point(20, 20), StringFormat.GenericDefault);
Pen _pen = new Pen(Color.Red, 6);
_graphics.FillPath(new SolidBrush(Color.White), _path);
Is there anyway to keep that from happening?
Any and all help would be GREATLY appreciated.