<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Crea una forma de triángulo mediante el objeto GraphicsPath</Title>
      <Author>Microsoft Corporation</Author>
      <Description>Dibuja un triángulo conectando una serie de puntos.</Description>
      <Shortcut>drawTri</Shortcut>
    </Header>
    <Snippet>
      <References>
        <Reference>
          <Assembly>System.Drawing.dll</Assembly>
        </Reference>
        <Reference>
          <Assembly>System.Windows.Forms.dll</Assembly>
        </Reference>
      </References>
      <Imports>
        <Import>
          <Namespace>Microsoft.VisualBasic</Namespace>
        </Import>
        <Import>
          <Namespace>System.Drawing</Namespace>
        </Import>
        <Import>
          <Namespace>System.Drawing.Drawing2D</Namespace>
        </Import>
        <Import>
          <Namespace>System.Windows.Forms</Namespace>
        </Import>
      </Imports>
      <Declarations>
        <Literal>
          <ID>Location1</ID>
          <ToolTip>Reemplazar por las coordenadas de inicio del segmento de la primera línea.</ToolTip>
          <Default>0, 0</Default>
        </Literal>
        <Literal>
          <ID>Location2</ID>
          <ToolTip>Reemplazar por las coordenadas de inicio del segmento de la segunda línea.</ToolTip>
          <Default>100, 0</Default>
        </Literal>
        <Literal>
          <ID>Location3</ID>
          <ToolTip>Reemplazar por las coordenadas de inicio del segmento de la tercera línea.</ToolTip>
          <Default>100, 100</Default>
        </Literal>
        <Literal>
          <ID>Location4</ID>
          <ToolTip>Reemplazar por las coordenadas de inicio del segmento de la cuarta línea.</ToolTip>
          <Default>0, 0</Default>
        </Literal>
        <Object>
          <ID>PictureBox</ID>
          <Type>System.Windows.Forms.PictureBox</Type>
          <ToolTip>Reemplazar por un objeto que tenga un método CreateGraphics.</ToolTip>
          <Default>PictureBox1</Default>
        </Object>
        <Object>
          <ID>Pen</ID>
          <Type>System.Drawing.Pen</Type>
          <ToolTip>Reemplazar por una pluma.</ToolTip>
          <Default>Pens.Black</Default>
        </Object>
      </Declarations>
      <Code Language="VB" Kind="method body"><![CDATA[Dim path As New GraphicsPath()
Dim points() As Point = { _
    New Point($Location1$), _
    New Point($Location2$), _
    New Point($Location3$), _
    New Point($Location4$)}
path.AddLines(points)

Dim surface As Graphics = $PictureBox$.CreateGraphics
surface.DrawPath($Pen$, path)
            ]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
