delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/01/13/11:17:54

Date: Thu, 13 Jan 94 09:52:45 CST
From: csaba AT vuse DOT vanderbilt DOT edu (Csaba A. Biegl)
To: djgpp-bounces AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Bug in LIBGRX103 ?
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

	From djgpp-bounces AT sun DOT soe DOT clarkson DOT edu Wed Jan 12 18:29:19 1994
	To: djgpp AT sun DOT soe DOT clarkson DOT edu
	Subject: Bug in LIBGRX103 ?

	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);
	}


Thanks for the report. The following diff 
(to ...contrib\libgrx\src\scancnvx.c) fixes the problem:

-----------------------------------------------------------
*** scancnvx.old	Thu Jan 13 09:09:44 1994
--- scancnvx.c	Thu Jan 13 09:08:14 1994
***************
*** 50,56 ****
  	    }
  	    else {
  		rdx = pt[1][0];
! 		rdy = pt[1][0];
  		MOUSE_BLOCK(CURC,ldx,ldy,rdx,rdy);
  		(*borderproc)(ldx,ldy,rdx,rdy,fillarg);
  	    }
--- 50,56 ----
  	    }
  	    else {
  		rdx = pt[1][0];
! 		rdy = pt[1][1];
  		MOUSE_BLOCK(CURC,ldx,ldy,rdx,rdy);
  		(*borderproc)(ldx,ldy,rdx,rdy,fillarg);
  	    }
-----------------------------------------------------------
For those who don't want to rebuild libgrx.a the following
.ZIP file contains the necessary patches both to the source
and to the library itself. Instructions:

1) uudecode the attached .ZIP file.

2) unzip it in the GRX base directory. (For example:
   \djgpp\contrib\libgrx) If you use pkunzip, don't
   forget the '-d' switch!



3) CD to the newly created .\TMP sub-directory.

4) Type:

      DO_PATCH 

   at the DOS prompt. This will overwrite "scancnvx.c" 
   in the ..\SRC sub-directory and replace the "scancnvx.o"
   module in ..\LIB\LIBGRX.A

5) You may now remove the contents of the TMP sub-directory
   if you wish.


NOTE: the above procedure assumes that the GRX directory tree
   is the same as in the distribution. If you modified it,
   change the steps in DO_PATCH.BAT appropriately!


----------------------------------------------------------------------
begin 666 grxpatch.zip
M4$L#!!0``````/!*+1P````````````````$````=&UP+U!+`P04````"`#V
M2BT</Z61IST&``"3$```#@```'1M<"]S8V%N8VYV>"YCG5=M;QI'$/Z,)?^!
M?IJD:L3!00Q1FT;843&Q'50,B)<F5F19R['`JL<=FCO>5.6_=V9W[P5LJTZ3
M\'*SL\_.///,+'E;*IV>0*D$PU:SV^K^];7:TL_&"*UPM4<U7\10;#E0^_"A
M[D(K$A,!ETK.?>L%\'O]#(:Q0EROX!.ZT!718J-\7[HPZKKP[GV]7DN=/0;X
M8[..9'4C AT JG$B?+CJIRN\R>/%BJ"F?(ET.=413&JR3J64UCS#H AT 7$F*)RPA\
M6B.S"K1M&GKKI0QBB_+:HP14,*]ZD]<NB(U0OI AT 0Y@S#I?87ZW AT 1(HC8/$VG
M**,(Q"3<R*K%:`*#0#@[0(-H$:[]*0C/"Y<K$>P)P$;<`#6#((SI0+W5XM@-
M$WD<QW8A46;;82LB"">Q4(&<5G-,6)REV#,Z`^5YV2K*9!W3F1MB5,1J^63<
M259WX3I-P8]"6(B-!)2>5!L"$^E>IN6F.X8;&4 AT 4/O37$U]Y%J2C/!E$E)`?
M!G,=@4ECA>$<Q1***N;RV=KHY))87CL-"Y*0M445$PVA]KU&*6$8SN*M(&ZN
M0ZHZI10&+K0#K^K";^]_A5M!I6INI)N(52PGJ*9S$MUM$\[JM7<?7!@/F]5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I/HLD1C$D4E>E.BMR7ZP%&*ZH;D/G>4HMJ0W"%G"35*-"#1
MI$33$@7 AT B7I0H*97+PZ$BZ_>-D.H7QD-]0Z&!J^,-X5065.+HR)6\79H%_-8
M&>-`Y>\V9YP*?VWKRXWN>+,=0@?M:N7OM?,^.KP]788=HF_;Q73N8L[O8+BC
M_E#H>#`T]-HP)*:O"06#P?Y!71+!$#!M(YV0I-:AP2OA\<#0P(2 AT _$/Z:+CU
M0CAT64Q!*A(@12T#0T61F))!F_@;4$L#!!0````(`+%++1RAA^#D3````(L`
M```0````=&UP+V1O7W!A=&-H+F)A=$O.+ZA4*$Y.S$O.*ZO02U;0TXLI+DKF
MY4HL4M"M*`-Q<S*30#B]J$(OD9<K&45]6F8%@I//RY62FH.I!614$891"EIZ
M^5H0'1"6%`!02P$"$P`4``````#P2BT<````````````````!```````````
M````````````=&UP+U!+`0(3`!0````(`/9*+1P_I9&G/08``),0```.````
M``````$``````"(```!T;7`O<V-A;F-N=G AT N8U!+`0(3`!0````(`/9*+1RG
M7W/%R00``/,(```0`````````````````(L&``!T;7`O<V-A;F-N=G AT N9FEX
M4$L!`A,`%`````@`L4LM'*&'X.1,````BP```!```````````0``````@@L`
G`'1M<"]D;U]P871C:"YB87102P4&``````0`!`#J````_`L`````
`
end


Csaba Biegl
csaba AT vuse DOT vanderbilt DOT edu


- Raw text -


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