Board index » delphi » Please help with graphics in text mode!

Please help with graphics in text mode!

I posted this earlier, but no one replied. Please respond! Thank you!
---------------------------------------------------------------------

Is it possible to plot a pixel or draw a line to the screen in text mode
using Turbo Pascal? (or ASM in a pascal procedure)
So far I have not been able to accomplish this--perhaps there is no way
to do it. If there is however, I would greatly appreciate a function or
procedure of the following format :

 PROCEDURE PlotPixel(X,Y,PColor : WORD); {PColor determines the color of}
                                         {the pixel to be plotted}
                                         {If it is only possible to plot in}
                                         {the current textcolor, this may}
                                         {be ommitted.}
   BEGIN
     (Code to plot pixel to text screen)
     (This can be in pascal or assembly--whatever works.)
   END;

If it is possible, I would also like a GetPixel fuction that returns the
color (or the state) of a textmode pixel at (X,Y).

Responses can be posted or sent to gr...@oboe.aix.calpoly.edu (I prefer
E-Mail, but I appreciate any form of help & will be reading the
newsgroup). Thank you very much!!!
                                                --JERRY

----------------------------------------------
-------I-Exist--------------------------------
----------------------------------------------
-------------gr...@oboe.aix.calpoly.edu-------
----------------------------------------------
---------I-Think------------------------------

 

Re:Please help with graphics in text mode!


In article <Pine.A32.3.91.960411234539.81294E-100...@trumpet.aix.calpoly.edu> Gerald Thomas Ryle <gr...@trumpet.aix.calpoly.edu> writes:

Quote
>I posted this earlier, but no one replied. Please respond! Thank you!
>---------------------------------------------------------------------

Actually, check again, because it did draw a couple replies.  Here's another
one.

Quote
>Is it possible to plot a pixel or draw a line to the screen in text mode
>using Turbo Pascal? (or ASM in a pascal procedure)
>So far I have not been able to accomplish this--perhaps there is no way
>to do it. If there is however, I would greatly appreciate a function or
>procedure of the following format :

Can it be done?  Yes and no.  You can create a small drawing area by using
the video BIOS character generator to modify the bitmap of the on-screen
font, however, color is limited to 8x14 blocks (EGA) or 9x16 blocks (VGA).

Another problem is that on VGA, since the text resolution is 720x400, each
character has a ninth column that cannot be readily modified (I think I
remember reading that it's a duplicate of the state of the ninth column,
not sure).  Your drawing area wouldn't look very good.

I *have* seen this done, but it's not that great.  It's much better to just
work in graphics mode and either use the BIOS to write characters to the
screen (slow but it works), write your own routines to do it, or use the
built-in graph unit font or external font files.

Quote
> PROCEDURE PlotPixel(X,Y,PColor : WORD); {PColor determines the color of}
>                                         {the pixel to be plotted}
>                                         {If it is only possible to plot in}
>                                         {the current textcolor, this may}
>                                         {be ommitted.}
>   BEGIN
>     (Code to plot pixel to text screen)
>     (This can be in pascal or assembly--whatever works.)
>   END;
>If it is possible, I would also like a GetPixel fuction that returns the
>color (or the state) of a textmode pixel at (X,Y).
>Responses can be posted or sent to gr...@oboe.aix.calpoly.edu (I prefer
>E-Mail, but I appreciate any form of help & will be reading the
>newsgroup). Thank you very much!!!
>                                                --JERRY
>----------------------------------------------
>-------I-Exist--------------------------------
>----------------------------------------------
>-------------gr...@oboe.aix.calpoly.edu-------
>----------------------------------------------
>---------I-Think------------------------------

--
Scott F. Earnest           | We now return you to our regularly scheduled
sc...@whiplash.res.cmu.edu | chaos and mayhem. . . .

Re:Please help with graphics in text mode!


Gerald Thomas Ryle <gr...@trumpet.aix.calpoly.edu> wrote:

Quote
>Is it possible to plot a pixel or draw a line to the screen in text mode
>using Turbo Pascal? (or ASM in a pascal procedure)

Not on most monitor cards.  Although there are one or 2 cards that do,
for the most part the answer is no.

Try the following and see if it suits your needs:

ftp://webworldinc.com/joejared/modexp.zip

http://www.webworldinc.com/joejared/index.htm
ftp://webworldinc.com/joejared/
--- Fidoknot v1.0
* Origin: Yorba Linda, CA (joeja...@webworldinc.com) BP8.0 please... Not everyone uses Windoze.

Other Threads