VB.NET可以将外部轮廓添加到文本(笔划)

时间:2013-04-28 01:13:16

标签: vb.net

是否可以添加一个大纲,一个继续从文本向外扩展的大纲?

即:来自Photoshop的外部笔画是我正在寻找的

我找到了一种方法让大纲进入文本内部,但这不是我想要的。

我环顾四周,但是我无法在google上找到任何需要大纲的人。

由于

当前内部轮廓:

    Dim grp As Graphics = e.Graphics
    Dim gp As New Drawing2D.GraphicsPath
    Dim useFont As Font = New Font("Impact", 60, FontStyle.Regular)
    grp.TextRenderingHint = Drawing.Text.TextRenderingHint.AntiAlias
    grp.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
    gp.AddString("3000", useFont.FontFamily, FontStyle.Regular, 60, New Point(0, 0), StringFormat.GenericTypographic)
    useFont.Dispose()

    Dim orangeBrush As New SolidBrush(Color.FromArgb(226, 149, 0))
    grp.FillPath(orangeBrush, gp)

    'This is the stroke below
    Dim blackpen As New Pen(Color.Black, 2)
    grp.DrawPath(blackpen, gp)
    gp.Dispose()

1 个答案:

答案 0 :(得分:1)

如果您颠倒绘制路径和填充路径的顺序,则可以获得文本的外边框。