[RESOLVED] Inverse coordinate system? How?
I'm just using
Code:
Picture1.Line (x1, Y1) - (X2, Y2)
for drawing some lines in the control.
The problem appears when I got a reverse line. I mean, in the VB6 coordinate system, the 0 value of Y is in the top of the picture1 control. I would like to draw like if the value 0 of the Y, would be in the bottom of the form instead of the top.
What do I need to modify?
Re: Inverse coordinate system? How?
Once you change the scale, any Print, Line, drawing commands are in 'user-defined' scale mode.
Let's say you want the picturebox to range from 0 to 1000 horizontally and 0 to 500 vertically but want the vertical coordinate system to move from bottom to top...
Picture1.Scale (0, 500) - (1000, 0)
The parameters are: Scale (x1, y1) - (x2, y2)
Again, once changed, the units of the picturebox are user-defined. In the above example, each unit is 1/1000th horizontally and 1/500th vertically. So, Picture1.Line (0,0) - (1000,500) will draw a diagonal line from the bottom left corner to the top right corner
1 Attachment(s)
Re: Inverse coordinate system? How?
take a look at this it lets you move the point of where to start
and then draw by angles 0-360
(some one here showed me how cant remember who,,,but thanks again : )
hope it helps : )
Re: Inverse coordinate system? How?
Unless I miss something ...
Picture1.Line (x1, Picture1.Height-Y1) - (X2, Picture1.Height-Y2)
Re: Inverse coordinate system? How?
Quote:
Originally Posted by
JackB
Unless I miss something ...
Picture1.Line (x1, Picture1.Height-Y1) - (X2, Picture1.Height-Y2)
Just one observation.
It works, but instead of using .Height I used .ScaleHeight
Thanks anyway.