public bool DrawString( System.Windows.Media.DrawingContext graphics, System.Windows.Media.FontFamily fontFamily, System.Windows.FontStyle fontStyle, System.Windows.FontWeight fontWeight, double fontSize, string strText, System.Windows.Point ptDraw, System.Globalization.CultureInfo ci) { Geometry path = GDIPath.CreateTextGeometry(strText, fontFamily, fontStyle, fontWeight, fontSize, ptDraw, ci); for (int i = 1; i <= m_nThickness; ++i) { SolidColorBrush solidbrush = new SolidColorBrush(m_clrOutline); Pen pen = new Pen(solidbrush, i); pen.LineJoin = PenLineJoin.Round; SolidColorBrush brush = new SolidColorBrush(m_clrText); graphics.DrawGeometry(brush, pen, path); } if (m_bOutlinetext == false) { for (int i = 1; i <= m_nThickness; ++i) { if (m_bClrText) { SolidColorBrush brush = new SolidColorBrush(m_clrText); SolidColorBrush solidbrush = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)); Pen pen = new Pen(solidbrush, 1.0); graphics.DrawGeometry(brush, pen, path); } else { SolidColorBrush solidbrush = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)); Pen pen = new Pen(solidbrush, 1.0); graphics.DrawGeometry(m_brushText, pen, path); } } } else { if (m_bClrText) { SolidColorBrush brush = new SolidColorBrush(m_clrText); SolidColorBrush solidbrush = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)); Pen pen = new Pen(solidbrush, 1.0); graphics.DrawGeometry(brush, pen, path); } else { SolidColorBrush solidbrush = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)); Pen pen = new Pen(solidbrush, 1.0); graphics.DrawGeometry(m_brushText, pen, path); } } return(true); }