Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 如何使用图形模糊抽绳?_Vb.net_Graphics_Brush - Fatal编程技术网

Vb.net 如何使用图形模糊抽绳?

Vb.net 如何使用图形模糊抽绳?,vb.net,graphics,brush,Vb.net,Graphics,Brush,我研究了几个星期,没有发现任何相关的东西,我想知道如何模糊VB.NET中创建的图形,做一个像Photoshop画笔一样的软画笔 示例 Dim DrawColor As Color = Color.Orange Dim brushSize As Integer = 10 Public Pt As Point Dim brush As New Pen(DrawColor, brushSize) Private Sub PaintBrush(x As Integer, y As Integer)

我研究了几个星期,没有发现任何相关的东西,我想知道如何模糊VB.NET中创建的图形,做一个像Photoshop画笔一样的软画笔

示例

Dim DrawColor As Color = Color.Orange
Dim brushSize As Integer = 10

Public Pt As Point
Dim brush As New Pen(DrawColor, brushSize)

Private Sub PaintBrush(x As Integer, y As Integer)

    graphic.SmoothingMode = SmoothingMode.AntiAlias
   'graphic.BLUR?
    graphic.DrawLine(brush, Pt, New Point(x, y))
    Pt = New Point(x, y)
    brush.Dispose()

  End Using

我的代码

Dim DrawColor As Color = Color.Orange
Dim brushSize As Integer = 10

Public Pt As Point
Dim brush As New Pen(DrawColor, brushSize)

Private Sub PaintBrush(x As Integer, y As Integer)

    graphic.SmoothingMode = SmoothingMode.AntiAlias
   'graphic.BLUR?
    graphic.DrawLine(brush, Pt, New Point(x, y))
    Pt = New Point(x, y)
    brush.Dispose()

  End Using

仅仅是一个想法/方法,你可以在颜色中使用alpha透明度,即
color.fromargb(150,color.Orange)
这将为笔划提供不透明性。令人钦佩的是,这不是一个模糊,但可以让你继续创造它。高斯模糊是最常见的模糊类型之一。它应该产生一个接近你的例子的结果!请注意,笔对象要比这复杂得多。它接受一个
画笔
;该笔刷可以是
LinearGradient
笔刷。您可以将
Blend
ColorBlend
图案应用于笔刷,使用
LineCap
样式,使用
SetSigmaBellShape
控制颜色衰减。将透明度应用于混合和笔刷。@preciousbetine我希望没有人会使用该代码。首先,仅适用于位图。然后,即使日期是2014年,它实际上是从这个代码项目:(2004年)和它的可怕的各个方面。除了使用
SetPixels
模糊图像外,它不会管理它创建的任何对象,从而导致混乱。只是一个想法/方法,您可以在颜色中使用alpha透明度,即
color.fromargb(150,color.Orange)
这可以为笔划提供不透明性。令人钦佩的是,这不是一个模糊,但可以让你继续创造它。高斯模糊是最常见的模糊类型之一。它应该产生一个接近你的例子的结果!请注意,笔对象要比这复杂得多。它接受一个
画笔
;该笔刷可以是
LinearGradient
笔刷。您可以将
Blend
ColorBlend
图案应用于笔刷,使用
LineCap
样式,使用
SetSigmaBellShape
控制颜色衰减。将透明度应用于混合和笔刷。@preciousbetine我希望没有人会使用该代码。首先,仅适用于位图。然后,即使日期是2014年,它实际上是从这个代码项目:(2004年)和它的可怕的各个方面。除了使用
SetPixels
模糊图像外,它不会管理它创建的任何对象,从而导致混乱。