mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/shared] Fix CurveView::drawArrow on arrow without orientation
This commit is contained in:
committed by
LeaNumworks
parent
511a96f464
commit
633776b92f
@@ -472,6 +472,10 @@ void CurveView::drawArrow(KDContext * ctx, KDRect rect, float x, float y, float
|
||||
*
|
||||
**/
|
||||
assert(angle >= 0.0f);
|
||||
if (std::fabs(dx) < FLT_EPSILON && std::fabs(dy) < FLT_EPSILON) {
|
||||
// We can't draw an arrow without any orientation
|
||||
return;
|
||||
}
|
||||
/* We compute the arrow segments in pixels in order to correctly size the
|
||||
* arrow without depending on the displayed range.
|
||||
* Warning: the computed values are relative so we need to add/subtract the
|
||||
|
||||
Reference in New Issue
Block a user