From 4818af14459f9d80dcdd00b5d02b2a2045f3a682 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 21 Sep 2022 15:43:05 -0400 Subject: [PATCH] Add better doc string on marker factory --- piker/ui/_annotate.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/piker/ui/_annotate.py b/piker/ui/_annotate.py index 35f6d548..8c555f64 100644 --- a/piker/ui/_annotate.py +++ b/piker/ui/_annotate.py @@ -32,7 +32,7 @@ def mk_marker_path( style: str, ) -> QGraphicsPathItem: - """ + ''' Add a marker to be displayed on the line wrapped in a ``QGraphicsPathItem`` ready to be placed using scene coordinates (not view). @@ -41,9 +41,13 @@ def mk_marker_path( style String indicating the style of marker to add: ``'<|'``, ``'|>'``, ``'>|'``, ``'|<'``, ``'<|>'``, ``'>|<'``, ``'^'``, ``'v'``, ``'o'`` - size Size of the marker in pixels. - """ + This code is taken nearly verbatim from the + `InfiniteLine.addMarker()` method but does not attempt do be aware + of low(er) level graphics controls and expects for the output + polygon to be applied to a ``QGraphicsPathItem``. + + ''' path = QtGui.QPainterPath() if style == 'o':