47 static void rotate(
double angle,
double &x,
double &y );
54 static double normalizedAngle(
double angle,
bool allowNegative =
false );
60 static double snappedAngle(
double angle );
89 static void relativeResizeRect( QRectF &rectToResize,
const QRectF &boundsBefore,
const QRectF &boundsAfter );
100 static double relativePosition(
double position,
double beforeMin,
double beforeMax,
double afterMin,
double afterMax );
107 static QFont scaledFontPixelSize(
const QFont &font );
116 static double fontAscentMM(
const QFont &font );
125 static double fontDescentMM(
const QFont &font );
135 static double fontHeightMM(
const QFont &font );
145 static double fontHeightCharacterMM(
const QFont &font, QChar character );
156 static double textWidthMM(
const QFont &font,
const QString &text );
167 static double textHeightMM(
const QFont &font,
const QString &text,
double multiLineHeight = 1.0 );
176 static void drawText( QPainter *painter, QPointF position,
const QString &text,
const QFont &font,
const QColor &color = QColor() );
190 static void drawText( QPainter *painter,
const QRectF &rectangle,
const QString &text,
const QFont &font,
const QColor &color = QColor(), Qt::AlignmentFlag halignment = Qt::AlignLeft, Qt::AlignmentFlag valignment = Qt::AlignTop,
int flags = Qt::TextWordWrap );
200 static QRectF largestRotatedRectWithinBounds(
const QRectF &originalRect,
const QRectF &boundsRect,
double rotation );
214 Q_DECL_DEPRECATED
static double scaleFactorFromItemStyle(
const QStyleOptionGraphicsItem *style )
SIP_DEPRECATED;
221 static double scaleFactorFromItemStyle(
const QStyleOptionGraphicsItem *style, QPainter *painter );
242 static double calculatePrettySize(
double minimumSize,
double maximumSize );
249 static bool itemIsAClippingSource(
const QgsLayoutItem *item );
256 static QVector< double > predefinedScales(
const QgsLayout *layout );
267 static double pointsToMM(
double pointSize );
273 static double mmToPoints(
double mmSize );
275 friend class TestQgsLayoutUtils;
Contains information about the context of a rendering operation.