Polyfill: Draw handles 'behind' lines
This commit is contained in:
parent
dc49449966
commit
4c42472089
1 changed files with 8 additions and 8 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
Scanline polygon fill routine based on public-domain code
|
Scanline polygon fill routine based on public-domain code
|
||||||
by Darel Rex Finley, 2007 <https://alienryderflex.com/polygon_fill/>
|
by Darel Rex Finley, 2007 <https://alienryderflex.com/polygon_fill/>
|
||||||
|
|
||||||
Last updated: May 14, 2024
|
Last updated: May 19, 2024
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -288,13 +288,6 @@ void polyfill_draw_preview(magic_api * api, SDL_Surface * canvas, int show_handl
|
||||||
|
|
||||||
SDL_BlitSurface(polyfill_snapshot, NULL, canvas, NULL);
|
SDL_BlitSurface(polyfill_snapshot, NULL, canvas, NULL);
|
||||||
|
|
||||||
for (i = 0; i < polyfill_num_pts - 1; i++)
|
|
||||||
{
|
|
||||||
api->line((void *)api, 0 /* which */ , canvas, NULL /* snapshot */ ,
|
|
||||||
polyfill_pt_x[i], polyfill_pt_y[i],
|
|
||||||
polyfill_pt_x[i + 1], polyfill_pt_y[i + 1], 1, polyfill_line_callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (show_handles)
|
if (show_handles)
|
||||||
{
|
{
|
||||||
for (i = 1; i < polyfill_num_pts - 1; i++)
|
for (i = 1; i < polyfill_num_pts - 1; i++)
|
||||||
|
|
@ -327,6 +320,13 @@ void polyfill_draw_preview(magic_api * api, SDL_Surface * canvas, int show_handl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < polyfill_num_pts - 1; i++)
|
||||||
|
{
|
||||||
|
api->line((void *)api, 0 /* which */ , canvas, NULL /* snapshot */ ,
|
||||||
|
polyfill_pt_x[i], polyfill_pt_y[i],
|
||||||
|
polyfill_pt_x[i + 1], polyfill_pt_y[i + 1], 1, polyfill_line_callback);
|
||||||
|
}
|
||||||
|
|
||||||
//SDL_UpdateRect(canvas, 0, 0, canvas->w, canvas->h);
|
//SDL_UpdateRect(canvas, 0, 0, canvas->w, canvas->h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue