Page 1 of 1

[Z88dk-users] Simple graphics in newlib?

Posted: Tue Jun 13, 2017 6:42 pm
by thricenightly
Am I correct in thinking that the graphics routines I found here:

https://github.com/z88dk/z88dk/blob/mas ... graphics.h

are for classic lib only?

And that they haven't been ported to newlib?

Putting the question another way, are there any routines usable from sdcc/newlib which can draw simple lines, etc?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Posted: Wed Jun 14, 2017 1:49 am
by alvin
Am I correct in thinking that the graphics routines I found here:
https://github.com/z88dk/z88dk/blob/mas ... graphics.h
are for classic lib only?
And that they haven't been ported to newlib?
Yes all the graphics routines are classic only. I haven't ported them over because I'd like to take the newlib as an opportunity to revisit graphics by adding a pipeline (mainly to apply clipping) followed by processing of graphics primitives that don't have to worry about clipping and can make use of a context that includes pen colour, eg. The implementation in the classic lib is b&w only for cross platform capability.

The only high level graphics function in the newlib is a fast pattern flood filler: https://github.com/z88dk/z88dk/blob/mas ... /zx.h#L278
I hope it still works as I've been fishing around in there in recent days :)

The only other graphics related thing are the display file address manipulators: https://github.com/z88dk/z88dk/blob/mas ... h/zx.h#L87
These can make it easier to write, say, line drawing functions.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot