Exforsys

Online Training

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


Go Back   Exforsys > Programming Talk > C and C++

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-10-2006, 03:39 AM
Senior Member
 
Join Date: Apr 2006
Posts: 145
Rahulbatra is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-11-2006, 07:24 AM
Junior Member
 
Join Date: Nov 2006
Location: Bangalore, India
Posts: 16
sarunraj is on a distinguished road
Send a message via AIM to sarunraj Send a message via Yahoo to sarunraj
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-11-2006, 04:03 PM
Senior Member
 
Join Date: Apr 2006
Posts: 145
Rahulbatra is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-12-2006, 03:10 AM
Junior Member
 
Join Date: Nov 2006
Location: Bangalore, India
Posts: 16
sarunraj is on a distinguished road
Send a message via AIM to sarunraj Send a message via Yahoo to sarunraj
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....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-14-2006, 06:13 AM
Senior Member
 
Join Date: Apr 2006
Posts: 145
Rahulbatra is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 12-25-2006, 10:45 PM
Senior Member
 
Join Date: Apr 2006
Posts: 141
Adrian is on a distinguished road
The discussion is interesting and even more interesting is the conclusion made by Rahul about the ending To of graphical functions.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
difference between winrunner 7./7.6 zecar Software Testing 1 11-13-2006 03:32 AM
Linux vs. Windows web Hosting, does it make a difference? sanereddy Unix Articles and Tutorials 7 04-23-2006 02:39 PM
what is difference between terminal service and remote desktop techguru Interview Questions 1 04-17-2006 09:14 AM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit Tech FAQ 0 06-01-2004 07:00 AM
Smalltalk FAQ (v.1.0) Vikas Malik Tech FAQ 0 04-17-2004 08:27 AM


All times are GMT -4. The time now is 04:50 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.