On Wednesday, 23 December 2015 at 19:22:01 UTC, Taylor Hillegeist
wrote:
So I have seen alot of projects that need the same sort of
stuff.
graphics libraries
gui libraries
game libraries
ploting libaries
they would all benefit from a backend solution with a common
interface for
color
fonts
drawing pen_style aliasing etc.
but each one i look at seems to have a built up solution with
various degrees of integration with things like freetype gdi
cairo sdl glew opengl.
Shouldn't there be like a common (interface/abstract class)
that these back-ends can fulfill? maybe I am unaware of how
these things are done. And perhaps there are performance
reasons that many of these are baked in.
perhaps it should be like:
standard color implementation.
font interface that converts glyphs into drawing strokes.
and a standard set of drawing instructions with transforms.
//probably a grotesque simplification
interface font_do{
glyphstrokes getstrokes(string characterstoget);
}
interface draw_do{
drawpixel(double x,double y);
drawline(double x,double y);
drawglyph(glypstrokes g);
getpostdrawnsize(glypstroks g)
... other things
}
It was an initiative, but it looks abandoned now (Aurora
Graphics):
Thread:
http://forum.dlang.org/thread/op.w9w0efr1707...@invictus.hra.local
Source Code: https://github.com/auroragraphics/