delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/01/12/19:15:42

To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Bug in LIBGRX103 ?
Date: Wed, 12 Jan 94 17:31:04 +0100
From: Marios Siormanolakis <sior AT ira DOT uka DOT de>

I found a problem with libgrx.a
The function GrFilledPolygon shows a strange behavior.

I expected the following program to draw a horizontal line.

#include <grx.h>
#include <stdio.h>

void main()
{
  int   p[2][2]={{300,200},{310,200}};

  GrSetMode(GR_default_graphics);
  GrFilledPolygon(2,p,GrWhite());
  getchar();
  GrSetMode(GR_default_text);
}

The result is something like this:

      \
       \

If i give GrFilledPolygon 3 points (2 identical) it works fine:

void main()
{
  int   p[3][2]={{300,200},{300,200},{310,200}};

  GrSetMode(GR_default_graphics);
  GrFilledPolygon(3,p,GrWhite());
  getchar();
  GrSetMode(GR_default_text);
}


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019