- Home
·
- Graphics
·
- Allows you to draw lines without using the 'Line' method. This could be useful if you just want to
Allows you to draw lines without using the 'Line' method. This could be useful if you just want to
Allows you to draw lines without using the 'Line' method. This could be useful if you just want to return the coordinates, rather than plot
Rate Allows you to draw lines without using the 'Line' method. This could be useful if you just want to
(2(2 Vote))
Dim TmpX As Integer
Dim TmpY As Integer
TmpX = Val(X)
TmpY = Val(Y)
PixLine 10, 10, TmpX, TmpY, 150
End Sub
Public Function PixLine(MoveX1 As Integer, MoveY1 As Integer, MoveX2 As Integer, MoveY2 As Integer, PixRes As Integer) As String
Dim TmpX
Dim TmpY
Dim CurX
Dim CurY
TmpX = MoveX1
TmpY = MoveY1
TmpX = MoveX2 - TmpX
TmpY = MoveY2 - TmpY
TmpX = TmpX / PixRes
TmpY = TmpY / PixRes
For cnt = 1 To PixRes
CurX = (TmpX * cnt) + MoveX1
CurY = (TmpY * cnt) + MoveY1
Picture1.PSet (CurX, CurY), RGB(255, 0, 0)
Next cnt
End Function
Allows you to draw lines without using the 'Line' method. This could be useful if you just want to Comments
No comments yet — be the first to post one!
Post a Comment