Exforsys
+ Reply to Thread
Results 1 to 6 of 6

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 ...

  1. #1
    Rahulbatra is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124

    Question 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.


  2. #2
    sarunraj is offline Junior Member Array
    Join Date
    Nov 2006
    Location
    Bangalore, India
    Answers
    16

    Thumbs up 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


  3. #3
    Rahulbatra is offline Senior Member Array
    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.


  4. #4
    sarunraj is offline Junior Member Array
    Join Date
    Nov 2006
    Location
    Bangalore, India
    Answers
    16

    Smile 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....


  5. #5
    Rahulbatra is offline Senior Member Array
    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.


  6. #6
    Adrian is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124
    The discussion is interesting and even more interesting is the conclusion made by Rahul about the ending To of graphical functions.


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...