PDA

Click to See Complete Forum and Search --> : How do i draw a line? Without Direct draw.


Libero
Jun 12th, 2000, 03:36 PM
I got the x and y coordinates of the pointer. How to draw a line with that coordinates. I canīt use Direct draw ( sitting on a NT station). I have some idea of catch the movement in shootergames like Q3. Then i can compare it to other gamers. Good idea?

Fox
Jun 13th, 2000, 12:43 AM
To draw a line you may use the LineTo API call which should work for NT too...

DiGiTaIErRoR
Jun 13th, 2000, 03:33 AM
Use the .line function:

Form1.line (x1,y1)-(x2,y2)
than you can draw a line from x2, y2 to a new point like this:
Form1.line -(x3,y3)

.line works with picturebox and other stuff.
Good luck,

kedaman
Jun 13th, 2000, 05:40 AM
Fox, how do you use colors with LineTo?

Fox
Jun 13th, 2000, 06:13 AM
You have to create a brush, apply it to the DC and then draw the line..

Libero
Jun 13th, 2000, 12:25 PM
Thank u! I got it now!

kedaman
Jun 13th, 2000, 04:02 PM
Fox, can you give me a code sample, since my didn't work