How can i program graphics in c++ using the standard library?
Myself
2008-08-17 01:10:09 UTC
I want to program graphics using the c++ standard library. I dont want to use directX or OpenGL or anything like that. Any idea where i should start
Thanks
Three answers:
chzgratr
2008-08-18 23:42:41 UTC
@voria -
"graphics.h" is not a standard header. It is no way part of the C++ standard library.
To answer the question, there is nothing in the standard library designed specifically for graphics programming.
The Win32 API has some graphics functions if you're on a windows machine, but they're very slow, and are in no way suited for games if that's you're intent.
Sorry, buddy, but if you want graphics, you need to use some sort of graphics library like OpenGL or SDL.
voria
2008-08-17 01:17:06 UTC
For graphics in c++ there is a file name graphic.h header file is situated using you can create your own graphic too...
Randy
2008-08-17 01:17:33 UTC
for example, drawing using gdi
for Borland c++
for ms vc++ just change the syntax
Graphics::TBitmap* gBitmap = new Graphics::TBitmap;
gBitmap->LoadFromFile("1.bmp");
Canvas->Draw(10,10,gBitmap);
Canvas->Brush->Bitmap = gBitmap;
Canvas->Ellipse(85,10,160,85);
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.