@@ -216,7 +216,7 @@ void draw::line(int from_x, int from_y, int to_x, int to_y, const color_t& c)
216216 SDL_RenderLine (renderer (), from_x, from_y, to_x, to_y);
217217}
218218
219- void draw::points (const std::vector<::point >& points)
219+ void draw::points (const std::vector<SDL_FPoint >& points)
220220{
221221 // We cannot decay vector<point> to SDL_Point* unless the two types are the same size.
222222 static_assert (sizeof (::point) == sizeof (SDL_Point));
@@ -249,27 +249,26 @@ void draw::circle(int cx, int cy, int r, uint8_t octants)
249249 int x = r;
250250 int y = 0 ;
251251
252- std::vector<::point > points;
252+ std::vector<SDL_FPoint > points;
253253
254- if (octants & 0x08 ) {
255- points.push_back ({static_cast <float >(cx + y), static_cast <float >(cy + x)});
256- }
257- if (octants & 0x01 ) {
258- points.push_back ({static_cast <float >(cx + y), static_cast <float >(cy - x)});
259- }
260- if (octants & 0x10 ) {
261- points.push_back ({static_cast <float >(cx - y), static_cast <float >(cy + x)});
262- }
263- if (octants & 0x80 ) {
264- points.push_back ({static_cast <float >(cx - y), static_cast <float >(cy - x)});
265- }
254+ if (octants & 0x08 ) {
255+ points.push_back ({static_cast <float >(cx + y), static_cast <float >(cy + x)});
256+ }
257+ if (octants & 0x01 ) {
258+ points.push_back ({static_cast <float >(cx + y), static_cast <float >(cy - x)});
259+ }
260+ if (octants & 0x10 ) {
261+ points.push_back ({static_cast <float >(cx - y), static_cast <float >(cy + x)});
262+ }
263+ if (octants & 0x80 ) {
264+ points.push_back ({static_cast <float >(cx - y), static_cast <float >(cy - x)});
265+ }
266266
267- d += 2 * y + 1 ;
268- ++y;
269- if (d > 0 ) {
270- d += -2 * x + 2 ;
271- --x;
272- }
267+ d += 2 * y + 1 ;
268+ ++y;
269+ if (d > 0 ) {
270+ d += -2 * x + 2 ;
271+ --x;
273272 }
274273
275274 draw::points (points);
0 commit comments