Using OutlineTextControl
I am using the OutlineTextControl that I found linked here somewhere and its great, however the outline gets drawn on the text instead of outside the text (like an outline). Is there any way to modify the class to do what I need?
Link to control code:
http://blogs.msdn.com/b/wpfsdk/archive/2006/12/24/using-text-as-a-decorative-graphic.aspx
Maybe there is an alternative way to do sharp outlines on text?
**Edit
I modified the class to draw the outline separate开发者_运维问答ly as below, and created a private variable in the class to hold my formatted text. This works almost perfect, the N letter has a little sharp point above it, and the W has a sharp point below as shown in my image, what would cause this?
drawingContext.DrawGeometry(null, new Pen(Stroker, StrokeThickness), _textGeometry);
drawingContext.DrawText(_formattedText, new Point(0, 0));
****Edit 2
Added the following code above the drawing code to define my stroke pen:
Pen pop = new Pen(Stroker, StrokeThickness);
pop.LineJoin = PenLineJoin.Round;
pop.MiterLimit = 10;
Now my outline is smooth and exactly what I wanted:
Added the following code above the drawing code to define my stroke pen:
Pen pop = new Pen(Stroker, StrokeThickness);
pop.LineJoin = PenLineJoin.Round;
pop.MiterLimit = 10;
Now my outline is smooth and exactly what I wanted:
精彩评论