<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2F2D_Graphics%2FPen_Alignment</id>
		<title>VB.Net Tutorial/2D Graphics/Pen Alignment - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2F2D_Graphics%2FPen_Alignment"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/2D_Graphics/Pen_Alignment&amp;action=history"/>
		<updated>2026-04-05T22:02:08Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/2D_Graphics/Pen_Alignment&amp;diff=3251&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/2D_Graphics/Pen_Alignment&amp;diff=3251&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/2D_Graphics/Pen_Alignment&amp;diff=3252&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/2D_Graphics/Pen_Alignment&amp;diff=3252&amp;oldid=prev"/>
				<updated>2010-05-26T12:54:42Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==List all Pen Alignment==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class AlignmentsDemo&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New AlignmentsForm)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
Public Class AlignmentsForm&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        components = New System.ruponentModel.Container()&lt;br /&gt;
        Me.Text = &amp;quot;AlignmentsForm&amp;quot;&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
&lt;br /&gt;
    Private Sub AlignmentsForm_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) Handles MyBase.Paint&lt;br /&gt;
        Dim g As Graphics = e.Graphics&lt;br /&gt;
        Dim alignNames As String() = System.Enum.GetNames(GetType(PenAlignment))&lt;br /&gt;
        Array.Sort(alignNames)&lt;br /&gt;
        Dim x As Integer = 0&lt;br /&gt;
        Dim y As Integer = 0&lt;br /&gt;
        Dim width As Integer = Me.ClientRectangle.Width&lt;br /&gt;
        Dim height As Integer = Me.ClientRectangle.Height&lt;br /&gt;
        Dim blackBrush As Brush = Brushes.Black&lt;br /&gt;
        Dim redPen As Pen = Pens.Red&lt;br /&gt;
        Dim alignName As String&lt;br /&gt;
        For Each alignName In alignNames&lt;br /&gt;
            Dim pen As Pen = New Pen(Color.White, 13)&lt;br /&gt;
            g.DrawEllipse(pen, x + 10, y + 10, width - 20, height - 20)&lt;br /&gt;
            g.DrawEllipse(redPen, x + 10, y + 10, width - 20, height - 20)&lt;br /&gt;
            Dim format As StringFormat = New StringFormat()&lt;br /&gt;
            format.Alignment = StringAlignment.Center&lt;br /&gt;
            format.LineAlignment = StringAlignment.Center&lt;br /&gt;
            g.DrawString(alignName, Me.Font, blackBrush, New RectangleF(x, y, width, height), format)&lt;br /&gt;
            y = y + 15&lt;br /&gt;
        Next&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PenAlignment Illustration==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Collections&lt;br /&gt;
Imports System.ruponentModel&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Data&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
public class PenAlignmentComboBox&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    Private penColor As Color = Color.Red&lt;br /&gt;
    Dim penWidth As Integer = 5&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    Friend WithEvents Label1 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label2 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents ComboBox1 As System.Windows.Forms.ruboBox&lt;br /&gt;
    Friend WithEvents numericUpDown1 As System.Windows.Forms.NumericUpDown&lt;br /&gt;
    Friend WithEvents Label3 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents ColorBtn As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents Draw As System.Windows.Forms.Button&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.Label1 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.Label2 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.ruboBox1 = New System.Windows.Forms.ruboBox&lt;br /&gt;
        Me.numericUpDown1 = New System.Windows.Forms.NumericUpDown&lt;br /&gt;
        Me.Label3 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.ColorBtn = New System.Windows.Forms.Button&lt;br /&gt;
        Me.Draw = New System.Windows.Forms.Button&lt;br /&gt;
        CType(Me.numericUpDown1, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label1.Location = New System.Drawing.Point(8, 16)&lt;br /&gt;
        Me.Label1.Name = &amp;quot;Label1&amp;quot;&lt;br /&gt;
        Me.Label1.Size = New System.Drawing.Size(80, 23)&lt;br /&gt;
        Me.Label1.TabIndex = 0&lt;br /&gt;
        Me.Label1.Text = &amp;quot;Pen Alignment&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label2.Location = New System.Drawing.Point(8, 56)&lt;br /&gt;
        Me.Label2.Name = &amp;quot;Label2&amp;quot;&lt;br /&gt;
        Me.Label2.Size = New System.Drawing.Size(72, 23)&lt;br /&gt;
        Me.Label2.TabIndex = 1&lt;br /&gt;
        Me.Label2.Text = &amp;quot;Pen Width&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ComboBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ruboBox1.Location = New System.Drawing.Point(96, 16)&lt;br /&gt;
        Me.ruboBox1.Name = &amp;quot;ComboBox1&amp;quot;&lt;br /&gt;
        Me.ruboBox1.Size = New System.Drawing.Size(121, 21)&lt;br /&gt;
        Me.ruboBox1.TabIndex = 2&lt;br /&gt;
        Me.ruboBox1.Text = &amp;quot;ComboBox1&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;numericUpDown1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.numericUpDown1.Location = New System.Drawing.Point(96, 56)&lt;br /&gt;
        Me.numericUpDown1.Name = &amp;quot;numericUpDown1&amp;quot;&lt;br /&gt;
        Me.numericUpDown1.Size = New System.Drawing.Size(32, 20)&lt;br /&gt;
        Me.numericUpDown1.TabIndex = 7&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label3&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label3.Location = New System.Drawing.Point(136, 56)&lt;br /&gt;
        Me.Label3.Name = &amp;quot;Label3&amp;quot;&lt;br /&gt;
        Me.Label3.Size = New System.Drawing.Size(56, 23)&lt;br /&gt;
        Me.Label3.TabIndex = 8&lt;br /&gt;
        Me.Label3.Text = &amp;quot;Pen Color&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ColorBtn&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ColorBtn.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(0, Byte), CType(0, Byte))&lt;br /&gt;
        Me.ColorBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat&lt;br /&gt;
        Me.ColorBtn.Location = New System.Drawing.Point(192, 56)&lt;br /&gt;
        Me.ColorBtn.Name = &amp;quot;ColorBtn&amp;quot;&lt;br /&gt;
        Me.ColorBtn.Size = New System.Drawing.Size(24, 16)&lt;br /&gt;
        Me.ColorBtn.TabIndex = 9&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Draw&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Draw.Location = New System.Drawing.Point(56, 104)&lt;br /&gt;
        Me.Draw.Name = &amp;quot;Draw&amp;quot;&lt;br /&gt;
        Me.Draw.Size = New System.Drawing.Size(120, 40)&lt;br /&gt;
        Me.Draw.TabIndex = 10&lt;br /&gt;
        Me.Draw.Text = &amp;quot;DrawGraphics&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(360, 349)&lt;br /&gt;
        Me.Controls.Add(Me.Draw)&lt;br /&gt;
        Me.Controls.Add(Me.ColorBtn)&lt;br /&gt;
        Me.Controls.Add(Me.Label3)&lt;br /&gt;
        Me.Controls.Add(Me.numericUpDown1)&lt;br /&gt;
        Me.Controls.Add(Me.ruboBox1)&lt;br /&gt;
        Me.Controls.Add(Me.Label2)&lt;br /&gt;
        Me.Controls.Add(Me.Label1)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;Pen Alignment and Pen Types Sample&amp;quot;&lt;br /&gt;
        CType(Me.numericUpDown1, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        AddPenAlignments()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub AddPenAlignments()&lt;br /&gt;
        comboBox1.Items.Add(PenAlignment.Center)&lt;br /&gt;
        comboBox1.Text = PenAlignment.Center.ToString()&lt;br /&gt;
        comboBox1.Items.Add(PenAlignment.Inset)&lt;br /&gt;
        comboBox1.Items.Add(PenAlignment.Left)&lt;br /&gt;
        comboBox1.Items.Add(PenAlignment.Outset)&lt;br /&gt;
        comboBox1.Items.Add(PenAlignment.Right)&lt;br /&gt;
    End Sub &amp;quot;AddPenAlignments&lt;br /&gt;
    Private Sub Draw_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Draw.Click&lt;br /&gt;
        Dim g As Graphics = Me.CreateGraphics()&lt;br /&gt;
        g.Clear(Me.BackColor)&lt;br /&gt;
        Dim pn1 As New Pen(Color.Blue, 3)&lt;br /&gt;
        pn1.Width = CSng(numericUpDown1.Value)&lt;br /&gt;
        pn1.Color = ColorBtn.BackColor&lt;br /&gt;
        Dim str As String = ComboBox1.Text&lt;br /&gt;
        Select Case str&lt;br /&gt;
            Case &amp;quot;Center&amp;quot;&lt;br /&gt;
                pn1.Alignment = PenAlignment.Center&lt;br /&gt;
            Case &amp;quot;Inset&amp;quot;&lt;br /&gt;
                pn1.Alignment = PenAlignment.Inset&lt;br /&gt;
            Case &amp;quot;Left&amp;quot;&lt;br /&gt;
                pn1.Alignment = PenAlignment.Left&lt;br /&gt;
            Case &amp;quot;Outset&amp;quot;&lt;br /&gt;
                pn1.Alignment = PenAlignment.Outset&lt;br /&gt;
            Case &amp;quot;Right&amp;quot;&lt;br /&gt;
                pn1.Alignment = PenAlignment.Right&lt;br /&gt;
            Case Else&lt;br /&gt;
        End Select&lt;br /&gt;
        g.DrawRectangle(pn1, 80, 150, 150, 150)&lt;br /&gt;
        Dim brush As New LinearGradientBrush(New Rectangle(10, 10, 20, 20), Color.Blue, Color.Green, 45.0F)&lt;br /&gt;
        g.FillRectangle(brush, 90, 160, 130, 130)&lt;br /&gt;
        pn1.Dispose()&lt;br /&gt;
        g.Dispose()&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>