ID Number: Q65200
6.00 6.00a 6.00ax
MS-DOS
buglist6.00 buglist6.00a buglist6.00ax fixlist7.00
Summary:
SYMPTOMS
In Microsoft C versions 5.0, 5.1, 6.0, 6.0a, and 6.0ax, and in
Microsoft QuickC versions 2.5 and 2.51, when _polygon() is called
to draw a filled polygon inside a clip region set with
_setcliprgn(), the polygon may not be drawn correctly. Any
horizontal lines that are being clipped will not be drawn at all.
The sample program below demonstrates the error.
STATUS
Microsoft has confirmed this to be a problem in C versions 6.0,
6.0a, and 6.0ax and QuickC versions 2.5 and 2.51 (buglist2.50 and
buglist2.51). This problem was corrected in C/C++ version 7.0.
More Information:
Sample Code
-----------
/* Compile options needed: none
*/
#include <graph.h>
struct xycoord pts[4] = {{0,0}, {55,55}, {83,25}, {0,0}};
void main(void)
{
_setvideomode(_ERESCOLOR);
/* show the polygon */
_setcolor(3);
_polygon(_GFILLINTERIOR, pts, 4);
getch();
/* show the clipped region */
_setcolor(3);
_rectangle(_GBORDER, 0, 0, 75, 50);
_setcliprgn(0,0, 75, 50);
getch();
/*** polygon drawn will have portion missing with _GFILLINTERIOR ***/
_setcolor(10);
_polygon(_GFILLINTERIOR, pts, 4);
getch();
/* clipped polygon drawn correctly with _GBORDER */
_setcolor(12);
_polygon(_GBORDER, pts, 4);
getch();
_setvideomode(_DEFAULTMODE);
}
Additional reference words: setcliprgn 6.00 6.00a 6.00ax 2.51