'|-------------------------------|
'|                               | 
'|                               |    
'|        Drawing class          |    
'|       made by frix199         |   
'|                               |  
'|                               |
'|-------------------------------|

'this class is VERY simple, i just made
'it to 'steal' some space and remove those 
'confusing "new rectanglef(10,20,3,38)"
'those random rectf's and points, i just 
'made them because i had nothing to do :P

'have fun!
'frix199

Public Class drawing
    Public b As Brush
    Public p As Pen
    Public f As Font
    Public c As Color


'this function returns a new rectanglef (as you can see)
    Public Function nrectf(ByVal x As Single, ByVal y As Single, ByVal width As Single, ByVal height As Single) As RectangleF
        Dim rff As New RectangleF(x, y, width, height)
        Return rff
    End Function

'this function returns a new rectangle
    Public Function nrect(ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer) As Rectangle
        Dim r As New Rectangle(x, y, width, height)
        Return r
    End Function

'this function returns a new point
    Public Function npoint(ByVal x As Integer, ByVal y As Integer) As Point
        Dim p As New Point(x, y)
        Return p
    End Function

'this function returns a new pointf
    Public Function npointf(ByVal x As Integer, ByVal y As Integer) As Pointf
        Dim pf As New Pointf(x, y)
        Return pf
    End Function

'grater the x, grater
'the numbers created :D
dim x as integer = 100 'default value 100 makes a numbers:
'10 or 20 or 30 or 40 or 50 or 60 or 70 or 80 or 90

'this function returns a random new rectanglef (as you can see)
    Public Function rnrectf As RectangleF
        Dim rff As New RectangleF(int(rnd * x), int(rnd * x), int(rnd * x), int(rnd * x))
        Return rff
    End Function

'this function returns a random new rectangle
    Public Function rnrect As Rectangle
        Dim r As New Rectangle(cint(int(rnd * x)), cint(int(rnd * x)), cint(int(rnd * x)), cint(int(rnd * x)))
        Return r
    End Function

'this function returns a random new point
    Public Function rnpoint As Point
        Dim p As New Point(cint(int(rnd * x)), cint(int(rnd * x)))
        Return p
    End Function

'this function returns a random new pointf
    Public Function rnpointf As Pointf
        Dim pf As New Pointf(cint(int(rnd * x)), cint(int(rnd * x)))
        Return pf
    End Function


    'this function changes the 'b' brush
    Public Function changeb(ByVal brush As Brush) As Brush
        b = brush
    End Function

    'this function changes the 'p' pen
    Public Function changep(ByVal pen As Pen) As Pen
        p = pen
    End Function

    'this function changes the 'c' color
    Public Function changec(ByVal color As Color) As Color
        c = color
    End Function

    'this function changes the size of 'f' font
    Public Function changefsize(ByVal size As Single) As Single
        f = New Font("Comic Sans MS", size, FontStyle.Bold)
    End Function


End Class
