On 24/06/2020 15:47,
bol...@nowhere.co.uk wrote:
> On Wed, 24 Jun 2020 12:47:33 +0100
> Bart <
b...@freeuk.com> wrote:
>> My job for about 15 years was creating graphics apps, starting on PCs in
>> the mid-80s which had very little graphics support (so I had to provide
>> drivers and libraries). The apps were full-screen mode - there was no
>> inter-process windowing. Actually there weren't any other processes,
>> only yours.
>
> Its not the mid-80s anymore.
So? What worked then /within an application/ will still work now within
an application.
> Great, but its not the mid-80s anymore. If you want to do graphics then every
> consumer OS requires you to deal with windows when doing graphics whether you
> like it or not.
And you still don't get it. in the same way that you can just print text
to a console without worrying about windowing or multiple consoles for
fonts or anything like that, you can do low-level graphics.
This is an extract from Stroutrup's paper listing future directions:
* "Support for simple graphics and simple user interaction"
That doesn't sound like GTK or WxWidgets to me. Neither does it sound
like using rendering libraries like Cairo or using PS/EPS/PDF.
The only exception is doing VGA graphics in a linux console
> or running a raw X server with no window manager but they're both frankly of
> little use in this day and age.
If such a thing can plot a pixel of a particular colour, then it has
everything needed to do graphics. (In theory; in practice it'll be too
slow for most things, and you will need to build a higher level library.)
>> Tell where in that code you specify which window you you write to, how
>> big the window is, and how it handles resizing or overlaps. Oh, you don't?
>
> Thats because - on unix at least - stdout writes to the tty which may or may
> not be linked to a virtual or physical terminal. Normally that terminal will
> be the one you run the program from within but it doesn't have to be the case.
Fine, do the graphics via text escapes; it doesn't really matter. (I
used to develop graphics boards, and at least one was driven via a
serial interface.)
>> Now imagine you had this line:
>>
>> setpixel(124, 456, 0xFF00FF);
>>
>> Do you get it now?
>
> And where does it writes to? Are you going to implement a shell inside your
> graphical window in order to kick it off? You might wish that we were still
> in the past with a single output destination but consumer OS's are not like
> that.
Windows at least lets you have a handle to the current console such that
you can draw pixel graphics into it. You get results like this:
https://github.com/sal55/langs/blob/master/console.png
But I'd recommend creating a separate window. That that can become the
default for pixel-based output.
(I'd say that was a concession to the 2020s, but the first graphics
hardware I build 40 years also had separate circuits for text and pixel
graphics, in that case with a discrete switch; I can't remember if one
could be overlaid on the other. There was only one monitor anyway. That
system was used for 3D graphics and image capturing and processing - on
8-bit hardware.)
The idea is to keep it simple, yes? And also something that is
guaranteed to be available.
> Umm, pdf has been a standard interchange format for a very long time.
> Postscript seems to be fading away a bit.
PDF seems to be a development of encapsulated Postscript. I wrote CAD
applications where a variety of such things were rendering targets (and
NeXT showed that PS could be used for interaction). But I think a
dedicated screen library, with the possibility of capturing drawing
commands, would be better.
>> below draws a solid, outlined circle into a giant bitmap. The functions
>> used are thin-ish wrappers around WinAPI, and using 1990s GDI (though
>> using dynamic code).
>
> You're stuck in the past. Time for you to catch the clue train back to 2020.
Not me. Clearly you and plenty of others want things to remain
complicated (maybe you get better paid that way, I don't know), with
myriad choices of graphics libraries each more elaborate than the next.
I like looking to the past because things that were a piece of cake back
then are now a bleeding nightmare, so lessons can be learnt. Yes, things
are bit more complex now, but maybe 1 magnitude more complex not several
magnitudes.