|
-
Mar 6th, 2012, 01:10 AM
#1
Thread Starter
Frenzied Member
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?
-
Mar 6th, 2012, 08:31 AM
#2
Re: coordinate system for graphic
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!
-
Mar 6th, 2012, 08:49 AM
#3
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.
-
Mar 6th, 2012, 09:01 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|