Create Design Pattern in

  • Private Sub Form1_Paint(ByVal sender As Object, _
    ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
    ' Scale by a factor of 90.
    e.Graphics.ScaleTransform(90, 90, MatrixOrder.Append)

    ' Translate to center on the form.
    e.Graphics.TranslateTransform( _
    Me.ClientRectangle.Width \ 2, _
    Me.ClientRectangle.Height \ 2, _

    For i As Integer = 5 To 360 Step 5
    ' Save the state.
    Dim graphics_state As GraphicsState = e.Graphics.Save()

    ' Rotate i degrees.
    e.Graphics.RotateTransform(i, MatrixOrder.Prepend)

    ' Draw a rectangle.
    e.Graphics.DrawRectangle(New Pen(Color.Black, 0), -1, -1, 1, 1)

    ' Restore the saved state.
    Next i
    End Sub

    Output is just like below piture

    386 x 300 - 14K
    for further details and related topics
  • 1 Comment sorted by
  • Simple and effective points. .NET Design Patterns through training, Net have two interfaces implemented specifically for an Observable pattern called IObservable and IObserver. My name is Andrea Goins I graphic designer at design back office.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week