Results 1 to 4 of 4

Thread: coordinate system for graphic

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    coordinate system for graphic

    I would like to know what are the use of ScaleHeight, ScaleLeft, ScaleTop, ScaleWidth, ScaleX, ScaleY). I don't have basic in coordinate system in visual basic. Need some explaination. Why the default coordinate system on the upper-left corner?

  2. #2
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: coordinate system for graphic

    Why don't you take a look in here: http://msdn.microsoft.com/en-us/libr...(v=vs.60).aspx
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  3. #3
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: coordinate system for graphic

    It gets even more bizarre, but we accept what we cannot change.

    When specifying a point as (x, y) the cartesian coordinates are mirrored on the Y axis from what might feel conventional. I.e. Y grows down rather than up.

    However radial coordinates, by which I mean angles as used in drawing circles and arcs via the Circle method, still grow counter-clockwise... instead of the clockwise you'd expect given the mirrored cartesian plane.

    And negative angle values are not negative angle values, but positive angles where the "sign" indicates you want a line drawn from the arc's endpoint to the center.
    Last edited by dilettante; Mar 6th, 2012 at 08:52 AM.

  4. #4
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    804

    Re: coordinate system for graphic

    Just for grins:
    Code:
    Option Explicit
    'upperleft: (-,+)
    'upperright: (+,+)
    'lowerleft: (-,-)
    'lowerright: (+,-)
    
    Private Sub Form_Load()
     AutoRedraw = True
     ScaleMode = vbPixels
     Me.Scale (-ScaleWidth, ScaleHeight)-(ScaleWidth, -ScaleHeight)
     Line (-ScaleWidth, 0)-(ScaleWidth, 0)
     Line (0, -ScaleHeight)-(0, ScaleHeight)
    End Sub
    Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
     Caption = "X: " & X & " Y: " & Y
    End Sub

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