Объяснять не буду. Сами разберетесь :) Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Dim path As New System.Drawing.Drawing2D.GraphicsPath path.AddBezier(20, 20, 100, 100, 220, 100, 320, 20) path.AddBezier(320, 20, 300, 60, 280, 120, 220, 150) path.AddLine(220, 150, 250, 200) path.AddLine(250, 200, 90, 200) path.AddLine(90, 200, 120, 150) path.AddBezier(120, 150, 60, 120, 40, 60, 20, 20) e.Graphics.DrawPath(New Pen(Color.Red, 3), path) Dim brush As New System.Drawing.Drawing2D.PathGradientBrush(path) brush.CenterColor = Color.LightYellow brush.CenterPoint = New PointF(170, 120) Dim grad() As Color = {Color.FromArgb(255, 105, 0, 0)} brush.SurroundColors = grad brush.FocusScales = New PointF(0.5, 0.5) e.Graphics.FillPath(brush, path) End Sub
|