![]() |
|
#11
|
|||
|
|||
Re: Drawing ProgramI suppose you wish to develop graphics library.
In the line function write a new member function like CPP / C++ / C Code:
You can go through Computer Graphics book, that has clear explanation of all the line algorithms. You actually need to capture the monitor pixels. Then you can write to the screen. As soon as I recollect the command or function for it, I will post you, meanwhile you can go thru google. |
|||
|
#12
|
|||
|
|||
Re: Drawing ProgramIs this book any good:
Code:
|
|
#13
|
|||
|
|||
Re: Drawing ProgramQuote:
From mingw compiler: g++ -Wall -W -pedantic Main.cpp -o Main.exe ************* Compile 1: ****************************************** Page.h:4:28: LineCollection.h: No such file or directory //posted filename mispelled LineCollectoin.h fixed ************* Compile 2: ****************************************** LineCollection.h:3:19: Linea.h: No such file or directory So,, the files LineCollection.h and Line.cpp BOTH have this line at top: #include "Linea.h" The posted code contained no file named linea.h ,, just line.h I change the both of the files above to: #include "Line.h" ...and left the actual filename alone. ************* Compile 3: ****************************************** In file included from Main.cpp:1: Page.h:1:9: warning: #pragma once is obsolete In file included from Page.h:3, from Main.cpp:1: PointCollection.h:1:9: warning: #pragma once is obsolete In file included from PointCollection.h:3, from Page.h:3, from Main.cpp:1: Point.h:1:9: warning: #pragma once is obsolete In file included from Page.h:4, from Main.cpp:1: LineCollection.h:1:9: warning: #pragma once is obsolete In file included from LineCollection.h:3, from Page.h:4, from Main.cpp:1: Line.h:1:9: warning: #pragma once is obsolete In file included from Main.cpp:1: Page.h:5:33: RectangleCollection.h: No such file or directory Main.cpp: In function `int main()': Main.cpp:15: error: no match for 'operator+' in 'L + p1' AAAAAT! W're sorry,, No "RectangleCollection.h" in posted files! ----------------------- So how about the file??? This takes some intuition but I don't think any of us have that much... How can we help if we don't have the right stuff !? Are you on Windows platorm? |
|
#14
|
|||
|
|||
Re: Drawing ProgramI Apologize about that. I have removed some classes to make it easier.
Anyway. Here's the Source Code that compiles.. Without the RectangleCollection.h of course. Point.h CPP / C++ / C Code:
///////////////////////////////////////////////////// ///////////////////////////////////////////////////// Point.cpp CPP / C++ / C Code:
///////////////////////////////////////////////////// ///////////////////////////////////////////////////// PointCollection.h CPP / C++ / C Code:
///////////////////////////////////////////////////// ///////////////////////////////////////////////////// PointCollection.cpp CPP / C++ / C Code:
Line.h CPP / C++ / C Code:
///////////////////////////////////////////////////// ///////////////////////////////////////////////////// Line.cpp CPP / C++ / C Code:
///////////////////////////////////////////////////// ///////////////////////////////////////////////////// LineCollectoin.h CPP / C++ / C Code:
///////////////////////////////////////////////////// ///////////////////////////////////////////////////// LineCollection.cpp CPP / C++ / C Code:
///////////////////////////////////////////////////// ///////////////////////////////////////////////////// Page.h CPP / C++ / C Code:
///////////////////////////////////////////////////// ///////////////////////////////////////////////////// Page.cpp CPP / C++ / C Code:
Main.cpp CPP / C++ / C Code:
|
Recent GIDBlog
Accepted for Ph.D. program by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Two-Tier data dissemination code installation problem | nidhibansal1984 | Computer Software Forum - Linux | 6 | 16-Sep-2007 11:13 |
| BOOKEEPING program, HELP!! | yabud | C Programming Language | 10 | 17-Nov-2006 04:48 |
| Menu driven drawing program | Mike Gustafson | C Programming Language | 5 | 06-Oct-2006 00:40 |
| Pipeline freeze simulation | darklightred | C++ Forum | 6 | 27-Jul-2006 20:37 |
| How to read particular memory location ? | realnapster | C Programming Language | 10 | 10-May-2006 10:11 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The