[python] matplotlib: improve arrow method, draw arrow edge

This commit is contained in:
Émilie Feral
2020-03-18 18:02:20 +01:00
parent 9e822e85e5
commit b5d3070ef5
4 changed files with 15 additions and 7 deletions

View File

@@ -43,6 +43,11 @@ void PlotView::traceSegment(KDContext * ctx, KDRect r, PlotStore::Segment segmen
segment.xEnd(), segment.yEnd(),
segment.color()
);
if (segment.isArrow()) {
float dx = segment.xEnd() - segment.xStart();
float dy = segment.yEnd() - segment.yStart();
drawArrow(ctx, r, segment.xEnd(), segment.yEnd(), dx, dy, segment.color());
}
}
void PlotView::traceRect(KDContext * ctx, KDRect r, PlotStore::Rect rect) const {