kopia lustrzana https://github.com/pimoroni/pimoroni-pico
PicoVector: Fix bug in Polygon.rectangle.
Fix spurious point in top-left corner causing a broken triangular rectangle when any permutation of corners other than the bottom-left is rounded.pull/1019/head
rodzic
e1143e80f3
commit
4c55038f94
|
@ -115,7 +115,7 @@ void _ppp_rrect_path(pp_path_t *path, ppp_rect_def d) {
|
|||
d.r1 == 0 ? pp_path_add_point(path, (pp_point_t){d.x, d.y}) : _ppp_rrect_corner(path, d.x + d.r1, d.y + d.r1, d.r1, 3);
|
||||
d.r2 == 0 ? pp_path_add_point(path, (pp_point_t){d.x + d.w, d.y}) : _ppp_rrect_corner(path, d.x + d.w - d.r2, d.y + d.r2, d.r2, 2);
|
||||
d.r3 == 0 ? pp_path_add_point(path, (pp_point_t){d.x + d.w, d.y + d.h}) : _ppp_rrect_corner(path, d.x + d.w - d.r3, d.y + d.h - d.r3, d.r3, 1);
|
||||
d.r4 == 0 ? pp_path_add_point(path, (pp_point_t){d.x, d.y}) : _ppp_rrect_corner(path, d.x + d.r4, d.y + d.h - d.r4, d.r4, 0);
|
||||
d.r4 == 0 ? pp_path_add_point(path, (pp_point_t){d.x, d.y + d.h}) : _ppp_rrect_corner(path, d.x + d.r4, d.y + d.h - d.r4, d.r4, 0);
|
||||
}
|
||||
|
||||
pp_poly_t* ppp_rect(ppp_rect_def d) {
|
||||
|
|
Ładowanie…
Reference in New Issue