Assignment 4: Due: October 2, but you have until Oct 9 due to Fall Break
Develop an X11 device dependent library and demonstrate by getting the test program test_lib2d_x11.c to work. This will ensure that you have both color and 2D polygons working and will then be used for the rest of the course.
Note: I'll give you all the code you need in the two files test_lib2d_x11.c and libx.c! All that is required is to interface the code to your own device independent libindep.c code. This might require changing a few names or parameters of routines.
As an intermediate step I will also give you a program called test_x11.c. It makes direct calls (with integer coords) to the routines in libx11.c. Simply compiling test_x11.c with libx11.c will give you a working program without including any other files. The assignment is NOT to get the program test_x11.c to work - that one already works as is if you compile it with just libx.c. However you should start this way just to verify that it does work and to straighten out any compilation issues involved.
Once test_x11 is working you then move to test_lib2d_x11.c which expects to be compiled with your libindep.c device independent library from assignments 1-3 and with libx11.c. You will need to add a few extra primitives to libindep.c to handle polygons and color - they will call device dependent routines in libx11.c.
The real work here is in interfacing my calls as provided in libx11.c to your calls as you defined them in libindep.c. There will be various programming issues - such as order and type of arguments and maybe C vs C++ issues. However when uncertain you can always refer back to the working, cruder, test_x11.c program.