Hi i was wondering how i would be able to draw a line that is dashed, or dotted using Pset. I was able to draw a line that has only one pixel break, but i need more than that. How can i implement that?
Any suggestions?Code:Dim d As Single Dim incrE As Integer Dim incrNE As Integer 'Bresenham algorithm dx = x1 - x0 dy = y1 - y0 d = dy * 2 - dx incrE = dy * 2 incrNE = (dy - dx) * 2 x = x0 y = y0 PSet (x, y) Do While x < x1 Or y < y1 If (d <= 0) Then d = d + incrE x = x + 1 Else d = d + incrNE x = x + 1 y = y + 1 End If PSet (x, y) Loop
thanks




Reply With Quote