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:
@@ -46,7 +46,7 @@ void PlotView::traceSegment(KDContext * ctx, KDRect r, PlotStore::Segment segmen
|
||||
segment.xEnd(), segment.yEnd(),
|
||||
segment.color()
|
||||
);
|
||||
if (segment.arrowWidth() > 0.0f) {
|
||||
if (!std::isnan(segment.arrowWidth())) {
|
||||
float dx = segment.xEnd() - segment.xStart();
|
||||
float dy = segment.yEnd() - segment.yStart();
|
||||
drawArrow(ctx, r, segment.xEnd(), segment.yEnd(), dx, dy, segment.color(), segment.arrowWidth());
|
||||
|
||||
Reference in New Issue
Block a user