mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/shared][python/port] CurveView::drawArrow uses pixel computation
instead of float computation to avoid precision errors, by default the arrow size is decided in pixels.
This commit is contained in:
@@ -106,7 +106,9 @@ mp_obj_t modpyplot_arrow(size_t n_args, const mp_obj_t *args, mp_map_t* kw_args)
|
||||
mp_map_elem_t * elem;
|
||||
// Setting arrow width
|
||||
elem = mp_map_lookup(kw_args, MP_OBJ_NEW_QSTR(MP_QSTR_head_width), MP_MAP_LOOKUP);
|
||||
mp_obj_t arrowWidth = (elem == nullptr) ? mp_obj_new_float(0.003) : elem->value;
|
||||
/* Default head_width is 0.0f because we want a default width in pixel
|
||||
* coordinates which is handled by CurveView::drawArrow. */
|
||||
mp_obj_t arrowWidth = (elem == nullptr) ? mp_obj_new_float(0.0f) : elem->value;
|
||||
|
||||
// Setting arrow color
|
||||
KDColor color;
|
||||
|
||||
Reference in New Issue
Block a user