File tree 3 files changed +20
-0
lines changed
python/core/auto_generated/layout
3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ The caller takes responsibility for deleting the returned object.
53
53
54
54
virtual QString displayName() const;
55
55
56
+ virtual QPainterPath shape() const;
57
+
56
58
57
59
QgsLineSymbol *symbol();
58
60
%Docstring
Original file line number Diff line number Diff line change 25
25
#include " qgssvgcache.h"
26
26
#include < QSvgRenderer>
27
27
#include < limits>
28
+ #include < QGraphicsPathItem>
28
29
29
30
QgsLayoutItemPolyline::QgsLayoutItemPolyline ( QgsLayout *layout )
30
31
: QgsLayoutNodesItem( layout )
@@ -312,6 +313,19 @@ void QgsLayoutItemPolyline::setArrowHeadWidth( double width )
312
313
update ();
313
314
}
314
315
316
+ QPainterPath QgsLayoutItemPolyline::shape () const
317
+ {
318
+ QPainterPath path;
319
+ path.addPolygon ( mPolygon );
320
+
321
+ QPainterPathStroker ps;
322
+
323
+ ps.setWidth ( 2 * mMaxSymbolBleed );
324
+ QPainterPath strokedOutline = ps.createStroke ( path );
325
+
326
+ return strokedOutline;
327
+ }
328
+
315
329
void QgsLayoutItemPolyline::setStartSvgMarkerPath ( const QString &path )
316
330
{
317
331
QSvgRenderer r;
Original file line number Diff line number Diff line change 20
20
#include " qgis_core.h"
21
21
#include " qgslayoutitemnodeitem.h"
22
22
#include " qgssymbol.h"
23
+ #include < QGraphicsPathItem>
24
+ #include " qgslogger.h"
25
+ #include " qgslayout.h"
23
26
24
27
/* *
25
28
* \ingroup core
@@ -61,6 +64,7 @@ class CORE_EXPORT QgsLayoutItemPolyline: public QgsLayoutNodesItem
61
64
int type () const override ;
62
65
QIcon icon () const override ;
63
66
QString displayName () const override ;
67
+ QPainterPath shape () const override ;
64
68
65
69
/* *
66
70
* Returns the line symbol used to draw the shape.
You can’t perform that action at this time.
0 commit comments