PSET redraw problem (pics included)
I have a picturebox and it draws circles according to the movement of the mouse pointer
http://i21.photobucket.com/albums/b2...y/picture1.jpg
It stores the x-y coordinates in a collection object.
Code:
Private Sub picCamera_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim var As New Entity
If Shift = 1 Then
picCamera.Circle (x, y), 25, vbRed
var.x = x
var.y = x
var.t = route.Count + 1
route.Add var
End If
End Sub
When I redraw the coordinates in the collection, the following is the shape. It looks completely different. It is supposed to be the same as the original shape.
http://i21.photobucket.com/albums/b2...y/picture2.jpg
Code:
For i = 1 To route.Count
x = route.Item(i).x
y = route.Item(i).y
frmCamera.picCamera.Circle (x, y), 25, vbRed
Next i
By the way, just ignore "Time step". It doesn't mean anything.
Re: PSET redraw problem (pics included)
The issue may be in your PSet routine? You didn't post that.
Re: PSET redraw problem (pics included)
Quote:
Originally Posted by LaVolpe
The issue may be in your PSet routine? You didn't post that.
Oops. Sorry. Wrong title
It's not PSET.
It's circle
I use circle because dots produced by PSET aren't thick enough
Re: PSET redraw problem (pics included)
Then can you show us your routine where you redraw the circles? The error is probably there.
Re: PSET redraw problem (pics included)
Actually the error is in the code which is already shown... if you look at the second picture, all of the circles are in a line which points directly to the origin, which implies that the same values are being used for x and y.
If you look at the numbers on the right of each picture, you can see that is the case, and this part of the code is the culprit:
Quote:
Originally Posted by winterslam
Code:
var.x = x
var.y = x
Re: PSET redraw problem (pics included)
duh, good eyes, good catch!