Open fschulze opened 10 months ago
Hi! I've uploaded my in-progress files here: https://gist.github.com/foone/11087057c4cf49c93212045e1e7e2b44
I've not yet actually written any parser for these, so it's possible they have syntax errors. Let me know if you run into anything that seems to be in conflict with the VGA Pride Flag Language page: https://wiki.foone.org/w/VGA_Flag_Language
Why the separate Quad
? I kind of understand Triangle
, because it is always convex and easier to render then Polygon
.
Why only three sizes for Star
and what are they? How many points has it? Where does the first spike point to? And what is the relation between the inner and outer radius? Wouldn't a slightly more complex definition with those things as variables make more sense?
What does Thick
mean for Lines
and Polygon
outlines?
Should signed integers work for Point
and the result should be clipped when rendering?
What is the default background color if a flag definition doesn't fill the whole screen?
Quad/Triangle/Polygon is a quirk of development, and in retrospect I should just simplify to Polygon.
Stars are complicated. They're 5 pointed stars, the first spike points up, and they're just defined in this code: https://github.com/foone/VGAPride/blob/36f33b714b05c2c669d91487ec747552b032c861/display.cpp#L75-L77
But yeah. Defining them as variables would make more sense, other than that the way polygons is defined doesn't let us set a translation... that seems an oversight. I think I'll drop Stars and make polygons able to take a point that shifts the 0,0 point for the polygon.
Thick vs Thin is complicated: I haven't defined what it means, I'm just calling the BGI function setlinestyle with NORM_WIDTH and THICK_WIDTH. Judging by how SDL_BGI reimplements this function, THICK_WIDTH is 3 pixels wide. It's implemented by drawing the line at the regular coordinates, and then again but shifted up and down or left and right, depending on the angle of the line.
Yep, Point values are integers, and should be clipped.
There's not really a default background color, due to how BGI works, but feel free to assume it's black.
I'll update this issue when I can update the spec page re: polygon/quad/triangle changes
Okay it's been updated, as have the gists. No more Star/Triangle/Quad, and Polygon now takes a base point.
At https://wiki.foone.org/w/VGA_Flag_Language you state "to be used in VGAPride". Did you already convert (some of) the flags to that language, or is it too early for that? I'd like to write a parser for it in Rust and could use some more examples.