[python] matplotlib: Add a parameter to to arrow to set the arrow width

This commit is contained in:
Émilie Feral
2020-05-19 09:32:35 +02:00
parent e92b56b78e
commit 0f8f82b94b
4 changed files with 15 additions and 11 deletions

View File

@@ -46,7 +46,7 @@ void PlotView::traceSegment(KDContext * ctx, KDRect r, PlotStore::Segment segmen
segment.xEnd(), segment.yEnd(),
segment.color()
);
if (segment.isArrow()) {
if (segment.arrowWidth() > 0.0f) {
float dx = segment.xEnd() - segment.xStart();
float dy = segment.yEnd() - segment.yStart();
drawArrow(ctx, r, segment.xEnd(), segment.yEnd(), dx, dy, segment.color());