
- Forum
- Programming Talk
- C and C++
- Is there any Difference
Is there any Difference
This is a discussion on Is there any Difference within the C and C++ forums, part of the Programming Talk category; Is there any difference between the line() function and the lineto() function in C program.If so can someone enlighten me ...
-
12-10-2006, 02:39 AM #1
- Join Date
- Apr 2006
- Answers
- 124
Is there any Difference
Is there any difference between the line() function and the lineto() function in C program.If so can someone enlighten me on this.
-
12-11-2006, 06:24 AM #2
- Join Date
- Nov 2006
- Location
- Bangalore, India
- Answers
- 16
Line () and Lineto ()
LINE () Function
takes two co-ordinates
LINE (x1,y1,x2,y2) .. It draws a line from (x1,y1) to (x2,y2).
LINETO () Function
Takes one coordinate
LINETO(x,y)
It draws a line from the current cursor position to the co-ordinate (x,y).
Suppose the position of the cursor is (10,10).. and u want to draw a line from (10,10) to (10,100).. then u will use lineto (10,100)..
Hope this helps..
Arun
-
12-11-2006, 03:03 PM #3
- Join Date
- Apr 2006
- Answers
- 124
Arun yes really it was a detailed explanation you gave. Thanks for the nice explanation. I like to know whether moveto() function also has a similar concept.
-
12-12-2006, 02:10 AM #4
- Join Date
- Nov 2006
- Location
- Bangalore, India
- Answers
- 16
Moveto ( )
Hi,
MOVETO ( ) Function
--------------------
It accepts one co-ordinate. moveto(x,y).
It just moves the cursor from the current position to another position.
For eg,
Say the cursor is at (90,20). You want the cursor to be moved to (90,45), then you will use the function moveto ( ) as:
MOVETO(90,45). This will move the cursor to (90,45).
Arun....
-
12-14-2006, 05:13 AM #5
- Join Date
- Apr 2006
- Answers
- 124
Thank you all for giving such a detailed explanation. I think that all "To" ending graphical functions take the current cursor position. Is there any graphical function which violates this.
-
The discussion is interesting and even more interesting is the conclusion made by Rahul about the ending To of graphical functions.
-
Sponsored Ads

Reply With Quote





