@@ -38,13 +38,41 @@ class CORE_EXPORT QgsDiagram
38
38
virtual QString diagramName () const = 0;
39
39
/* *Returns the size in map units the diagram will use to render.*/
40
40
virtual QSizeF diagramSize ( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s ) = 0;
41
- /* *Returns the size in map units the diagram will use to render. Interpolat size*/
41
+ /* *Returns the size in map units the diagram will use to render. Interpolate size*/
42
42
virtual QSizeF diagramSize ( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) = 0;
43
43
44
44
protected:
45
+ /* * Changes the pen width to match the current settings and rendering context
46
+ * @param pen The pen to modify
47
+ * @param s The settings that specify the pen width
48
+ * @param c The rendering specifying the proper scale units for pixel conversion
49
+ */
45
50
void setPenWidth ( QPen& pen, const QgsDiagramSettings& s, const QgsRenderContext& c );
51
+
52
+ /* * Calculates a size to match the current settings and rendering context
53
+ * @param size Unused
54
+ * @param s The settings that specify the diagram size
55
+ * @param c The rendering specifying the proper scale units for pixel conversion
56
+ *
57
+ * @return The converted size for rendering
58
+ */
46
59
QSizeF sizePainterUnits ( const QSizeF& size, const QgsDiagramSettings& s, const QgsRenderContext& c );
60
+
61
+ /* * Calculates a length to match the current settings and rendering context
62
+ * @param l The length to convert
63
+ * @param s Unused
64
+ * @param c The rendering specifying the proper scale units for pixel conversion
65
+ *
66
+ * @return The converted length for rendering
67
+ */
47
68
float sizePainterUnits ( float l, const QgsDiagramSettings& s, const QgsRenderContext& c );
69
+
70
+ /* * Calculates a size to match the current settings and rendering context
71
+ * @param s The settings that contain the font size and size type
72
+ * @param c The rendering specifying the proper scale units for pixel conversion
73
+ *
74
+ * @return The properly scaled font for rendering
75
+ */
48
76
QFont scaledFont ( const QgsDiagramSettings& s, const QgsRenderContext& c );
49
77
};
50
78
0 commit comments