Results 1 to 6 of 6

Thread: PSET redraw problem (pics included)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    146

    PSET redraw problem (pics included)

    I have a picturebox and it draws circles according to the movement of the mouse pointer




    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.






    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.
    Last edited by winterslam; Nov 12th, 2008 at 12:17 PM.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: PSET redraw problem (pics included)

    The issue may be in your PSet routine? You didn't post that.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    146

    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
    Last edited by winterslam; Nov 12th, 2008 at 12:14 PM.

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: PSET redraw problem (pics included)

    Then can you show us your routine where you redraw the circles? The error is probably there.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    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

  6. #6
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: PSET redraw problem (pics included)

    duh, good eyes, good catch!
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width