Open ali1234 opened 4 years ago
Having just gone to look up the unfilled rectangle API function... is this still on the 'wanted' list? :-)
+1 I'd like this
Actually looking at this, filled polygon is already in the API:
void Surface::polygon(std::vector<Point> points)
and outline_circle is in primitive.cpp but commented out.
I wonder if it's worth porting https://github.com/lowfatcode/pretty-poly and https://github.com/lowfatcode/alright-fonts or a little ambitious.
:thinking: None of the examples use polygon
, maybe we need a "primitives" example...
Got enough changes waiting for a release already though :laughing:
The following graphics primitives aren't implemented in the blit API. They probably should be for completeness:
An unfilled ellipse algorithm is described here: https://dai.fmph.uniba.sk/upload/0/01/Ellipse.pdf
Once ellipses are implemented, the circle implementations can be a wrapper around them to save space.
Filled polygons can be implemented by drawing filled triangles: