This draws a grid with the amount of columns and rows the user wants, but I've been struggling to allow painting So I am trying to create an application to ease creation of pixel arts (school project), what I've done so far is draw a grid in a panel, next step would be to allow the user to click on a cell and have it painted, but I can't manage to make it work, here's the code I have: Private Sub drawGrid(g As Graphics, rows As Integer, columns As Integer)ĭim originPoint As Point = New Point(10, 2)ĭim right As Integer = originPoint.X + (columns * size.Width)ĭim down As Integer = originPoint.Y + (rows * size.Height)įor y As Integer = up To down + 1 Step size.Heightįor x As Integer = left To right + 1 Step size.Width
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |