On Wed, 31 Jul 2002 Ajith Kumar wrote :
ajith
Hello all,
here is a small program that will help those who want to do
Turbo-C
style graphics under X-window .
-----------
There are some people who require some minimal amount of graphics
and
managing it using
Turbo-C under DOS platform. Here is a program that can help you
compiling and running
those programs with minor modifications. Turbo-C graphics
functions are
emulated in a crude
manner using X-lib calls.
A program draw.c to draw a rectangle is shown below
#include "xwin.c"
void mycode()
{
rectangle(100,100,200,200);
}
int main()
{
makeWindow (600, 500); / creates a window to draw
return 0;
}
You just needs to include the file xwin.c, that is provided.
Write all
your code inside a function
named 'mycode' . Compile it using the command
gcc -o draw -I/usr/include/X11 -L/usr/X11R6/lib -lXaw3d -lXt
-lX11
draw.c
Attaching draw.c, demo.c and a Makefile.
Your feedback would be nice.
ajith