I am learning some basics about drawing in VB and it's going quite good. I understand how to create a pen, how to draw a line, rectangle, triangle , polygon etc. But there is one thing I just can't understand. How the x and y coordinates work? I have code like this:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim grafika As Graphics = Me.CreateGraphics
Dim A As New Point(10, 10)
Dim B As New Point(10, 100)
Dim C As New Point(100, 10)
Dim D As New Point(100, 100)
Dim tacke As Point() = {A, B, C, D}
Dim olovka As Pen = New Pen(Brushes.Black, 3)
grafika.DrawPolygon(olovka, tacke)
End Sub
End Class
But, don't understand why I get that shape, I wanted to be something else, like Square, doesen't mather. I know it can be done with rectangle but wanted to use point for practice.