Mail Archives: djgpp/2002/01/14/08:30:07

X-Authentication-Warning: mailnull set sender to djgpp-bounces using -f
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: scanf & 320*200
Date: 14 Jan 2002 13:23:09 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 25
Message-ID: <a1um3t$q81$1@nets3.rz.RWTH-Aachen.DE>
References: <AKz08.1135$Oh1 DOT 524601 AT monolith DOT news DOT easynet DOT net>
X-Trace: nets3.rz.RWTH-Aachen.DE 1011014589 26881 (14 Jan 2002 13:23:09 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 14 Jan 2002 13:23:09 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

charlie <charlieo AT ukonline DOT co DOT uk> wrote:

> i know i'm missing important info but not sure what -
> if it's possible to printf, or sprintf, with textout or textout_centre etc
> in (320 * 200), why not scanf, possibly using FILE to set the stream
> pointer?

Because scanf reads the *keyboard*, not the screen.  The screen isn't
modelled as a readable file, so you can't read it like one.

Only text screens can be read out (using ScreenGetChar() from the
<pc.h> package) directly. In graphics mode, there is no explicit
representation of a single displayed character that you could read
out: it's just an arbitrary collection of pixels.

So, in a nutshell: graphical display mode means you can only read
pixels, not characters from video memory.  

Characters can be converted into graphical pixels for output, but the
reverse operation is beyond the scope of both the BIOS and the vast
majority of graphics libraries: only OCR software for scanners usually
does that.
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -

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