www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/11/06:16:36

From: Xavier Prat Recio <prat AT mmt DOT upc DOT es>
Newsgroups: comp.os.msdos.djgpp
Subject: grx22 bug???
Date: Mon, 11 May 1998 12:09:49 +0200
Organization: Universitat Politècnica de Catalunya
Lines: 53
Message-ID: <3556CE6C.3785FD85@mmt.upc.es>
NNTP-Posting-Host: maria.upc.es
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Este es un mensaje multipartes en formato MIME.
--------------70ACA0ABAFC66E10673DEC38
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi everybody

I don't know wether I've found a bug in grx22, which also stands for
grx20, or it's just my little knowledge of that library which makes me
think so. Let's explain what happens.

I am building a numerical solver programa with djgpp2.0 which also tries
to print graphically its results. When doing so, I convert each
numerical value, double precission, into a rgb 'color' ranging from 0 to
255, that is GrNumColors()-1. The fucntion I use is
c=GrAllocColor(r,g,b). Then, I also implement a graphical reading
procedure which qeries for the color represented in each pixel and
converts that color into its correct numerical value. However, when
performing that action with GrQueryColor(c,&r,&g,&b) I found that those
rgb values set to GrNumColors()-1, that is 255 in my graphics mode, once
read become 252!!!. Those set to 0 are 0 equally, but what happen to
those in between?

If it's any help, my graphics board is a S3 with 1Mb.

Any hint?. Let me know, please.

Xavier Prat Recio
Universitat Politècnica de Catalunya

--------------70ACA0ABAFC66E10673DEC38
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Tarjeta de Xavier Prat Recio
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Xavier Prat Recio
n:              Prat Recio;Xavier
org:            Universitat Politècnica de Catalunya
adr:            Avgda. Diagonal, 647; 7ª planta.;;;Barcelona;;E08028;Spain
email;internet: prat AT mmt DOT upc DOT es
title:          Research Engineer
tel;work:       +34-3 401·65·80
tel;fax:        +34-3 401·66·00
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


--------------70ACA0ABAFC66E10673DEC38--

- Raw text -


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