Results 1 to 7 of 7

Thread: How do i draw a line? Without Direct draw.

  1. #1

    Thread Starter
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460
    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?

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    To draw a line you may use the LineTo API call which should work for NT too...

  3. #3
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Use the .line function:
    Code:
    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,

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Fox, how do you use colors with LineTo?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    You have to create a brush, apply it to the DC and then draw the line..

  6. #6

    Thread Starter
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460

    Thumbs up

    Thank u! I got it now!

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Fox, can you give me a code sample, since my didn't work
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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