Re: Hiw to use graphics in gforth?

paul.ortais-WGBUbHxT2D9Wk0Htik3J/[email protected] Fri, 20 May 2022 19:11:31 +0200
Newsgroups gmane.comp.lang.forth.gforth
Message-ID <[email protected]>
Hello Anton, Joe,

I wasn't the initiator of this request, but it directly relates to a 
concern of mine.
Though I can live with just at-xy and and scarce polices, the lack of 
graphics words in Gforth, and the reluctance to provide them in general 
in Forth, has something extremely bizarre that I concluded is a part of 
an "elite" club wanting to remain tiny.

Anton, in your answer to Joe,  I can hardly figure what "open a pipe" 
means in reality for me, or "through the C interface" etc.

Reading this I imagined that if only there is a single (Forth) word, for 
a given OS ok, to draw a pixel where I need it with graphic attributes, 
That would be cataclysmic in the Forth world. Like:
: Pix. ( RGB i j --)
   ????????
;
Then many would be in heaven.

And if this is out of reach, something like
: GraphPg. ( i j --)
   cols 0 do
     raws 0 do
       I maxcols * J + My-rgb-shadow-screen pix.
     loop
   loop
;
Would be the first step to an interview with St Peter.
Juste with that, we can do the maths.

But am I dreaming ?

(A bit of help to Joe)
Have wonderful times, thought lovers
Paul

Le 2022-05-20 08:53, Anton Ertl a écrit :

> On Thu, May 19, 2022 at 08:15:55AM +0800, Joe Lin wrote:
> 
>> Dear Sir,
>> 
>> Would you please tell us the way to use graphics such as line or draw 
>> in
>> gforth?
> 
> Development Gforth includes the GUI library MINOS2, but it is
> undocumented.
> 
> Otherwise, you typically can use your OSs graphics facilities through
> the C interface.
> 
> Another way is to open a pipe to gs (Ghostscript) and send Postscript
> source code to it.
> 
> If you write something about your platform and maybe about your
> intended application, maybe some other readers here will post some
> recommendations.
> 
> - anton