Graphics/font/platform backends with common interfaces?
Taylor Hillegeist via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Dec 23 11:22:01 PST 2015
So I have seen alot of projects that need the same sort of stuff.
they would all benefit from a backend solution with a common
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
glyphstrokes getstrokes(string characterstoget);
drawpixel(double x,double y);
drawline(double x,double y);
... other things
More information about the Digitalmars-d-learn