From: Arjen M. <arj...@wl...> - 2004-06-04 13:29:25
|
Arjen Markus wrote: > > Maurice LeBrun wrote: > > > > > > It was just a shortcut at the time. Feel free to make it dynamic as that > > would certainly be an improvement. It looks like all the following files > > are affected: > > > > ged$ find . -path \*.c |xargs fgrep PL_MAXPOLY | cut -f 1 -d : |uniq > > ./bindings/tk/plr.c > > ./drivers/tkwin.c > > ./drivers/xfig.c > > ./drivers/xwin.c > > ./src/plbuf.c > > ./src/plfill.c > > ./src/plline.c > > ./src/plot3d.c > > ./sys/dos/djgpp/src/gnusvga.c > > ./sys/dos/emx/src/emxvga.c > > ./utils/plrender.c > > > Some further analysis showed: - plbuf.c is indeed affected - rdbuf_polyline bluntly assumes the number of points is smaller/equal PL_MAXPOLY - plline.c is affected because of the clipping routines (not the drawing of the polylines) - plfill.c is affected (two functions) - plot3d.c is not affected - only small polygons are used there - xwin.c is affected, as is win3.cpp and most other drivers: The polygon fill function has to prepare the raw data for the call to the specific function that does the actual work. I have a prototype now that does the work (the idea: use the predefined arrays of size PL_MAXPOLY whenever they are suitable, otherwise use temporary arrays. This way we maintain some efficiency when no big polygons are needed) Regards, Arjen |