Graficación

Páginas: 2 (313 palabras) Publicado: 15 de octubre de 2012
C++ Graphics for Windows using WINBGIm

Download and install the WINBGIm devpak file
"WinBGIm-6.0-1g17l.DevPak".
www.onecore.net/winbgim-graphics.htm


Open Dev C++ and create a new project.File -> New -> Project...
Choose the WinBGIm tab.
Choose either with our without console.
Give your project a name.
The newly created project will contain source code.
Save the cpp file withany name you choose.
Put it in the same folder as the project.
Compile the project.

The project folder now will contain 9 files:
(Using the project name Project1, and the file name file1)Project1.ico – a default icon for the exe file, and application frame.
File1.cpp – Your C++ source code.
Makefile.win – Specifies files to use in project, compiler to use...
Project1.dev – Dev C++ Projectfile. Double click this to open project.
Project1_private.h – Header file that would hold complicated stuff if we had any.
Project1_private.rc – Precompiled resource file, has name of icon file.File1.o – Output file from compiling File1.cpp
Project1.exe – Linked executable for entire project.
Project1_private.rc – Compiled resource file.


The source code

#include
#include
usingnamespace std;

int main( )
{
initwindow( 640 , 480 , "WinBGIm" );
outtextxy( 0 , 0 , "Hello WinBGIm!" );
bgiout 300)
{
xv = - 10;
}
if(x < 200){
xv = 10;
}

cleardevice();
circle(x, 100, 10);
floodfill(x, 100, dcolor);
delay(50);
}
closegraph( );
return( 0 );
}class Ball
{
private:
int x;
int xv;
int dcolor;

public:
Ball()
{
x = 250;
xv = 10;
dcolor = COLOR(255, 0, 55);
setcolor(dcolor);
setfillstyle(SOLID_FILL,COLOR(155, 0, 55));
}
void paint()
{
x += xv;
if(x > 300)
{
xv = - 10;
}
if(x < 200)
{
xv = 10;
}
circle(x, 100, 10);
floodfill(x, 100,...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Graficacion
  • Graficacion
  • Graficacion
  • Graficacion
  • Graficacion
  • Graficacion
  • Graficacion
  • Graficacion

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS