| | |
graphics in c++
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2007
Posts: 6
Reputation:
Solved Threads: 0
well I AM USIING TURBO C++,OS IS WINDOWS XP PROFESSIONAL,AND I AM USING PUTPIXEL COMMAND...WE CANT REDUCE THE THE DISTANCE BETWEEN THE POINTS BECAUSE PUTPIXEL COMMAND ACCEPTS ONLY INTEGER VALUES,SO IF A FLOATING POINT VALUE WILL BE USED IT WILL BE TRUNCATED...EG..PUTPIXEL(31,50,2) 31 IS THE X COORDIANTE,50 =Y COORDINATE, 2 IS THE COLOR OF TEH PIXEL...
IS SAME AS PUTPIXEL(31.4,50.3,2);
IS SAME AS PUTPIXEL(31.4,50.3,2);
OK, so you've recognised that pixel plotting is integer based, so what's the problem?
To draw a pixel at a fractional position, you have to resort to Anti-aliasing.
Now, if you were using a modern compiler, with a modern graphics library (and not that stone-age fossil everyone seems to love for some unknown reason), then you might be able to get some built-in support. But as it is, expect to get down to doing some serious maths to make your images look good.
The first problem you'll come across is the utter lack of a decent colour space in your fossil graphics library. AA works best on say an 8:8:8 colour space, but with something crude like 3:3:2 or even a 256-palette, your options are severely limited.
To draw a pixel at a fractional position, you have to resort to Anti-aliasing.
Now, if you were using a modern compiler, with a modern graphics library (and not that stone-age fossil everyone seems to love for some unknown reason), then you might be able to get some built-in support. But as it is, expect to get down to doing some serious maths to make your images look good.
The first problem you'll come across is the utter lack of a decent colour space in your fossil graphics library. AA works best on say an 8:8:8 colour space, but with something crude like 3:3:2 or even a 256-palette, your options are severely limited.
![]() |
Similar Threads
- getting graphics into c++ (C++)
- Graphics cards question? (Monitors, Displays and Video Cards)
- Graphics T and L support (Monitors, Displays and Video Cards)
- XP and Graphics card problems (Windows NT / 2000 / XP)
- graphics card (Monitors, Displays and Video Cards)
- recommendations 4 a 3D graphics prog? (Graphics and Multimedia)
Other Threads in the C++ Forum
- Previous Thread: Creating Variables on the fly
- Next Thread: I have just need help with one function...
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node output parameter pointer problem program programming project proxy python read recursion recursive reference return rpg string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






