46 static void rotate(
double angle,
double &x,
double &y );
53 static double normalizedAngle(
double angle,
bool allowNegative =
false );
59 static double snappedAngle(
double angle );
88 static void relativeResizeRect( QRectF &rectToResize,
const QRectF &boundsBefore,
const QRectF &boundsAfter );
99 static double relativePosition(
double position,
double beforeMin,
double beforeMax,
double afterMin,
double afterMax );
106 static QFont scaledFontPixelSize(
const QFont &font );
115 static double fontAscentMM(
const QFont &font );
124 static double fontDescentMM(
const QFont &font );
134 static double fontHeightMM(
const QFont &font );
144 static double fontHeightCharacterMM(
const QFont &font, QChar character );
155 static double textWidthMM(
const QFont &font,
const QString &text );
166 static double textHeightMM(
const QFont &font,
const QString &text,
double multiLineHeight = 1.0 );
175 static void drawText( QPainter *painter, QPointF position,
const QString &text,
const QFont &font,
const QColor &color = QColor() );
189 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 );
199 static QRectF largestRotatedRectWithinBounds(
const QRectF &originalRect,
const QRectF &boundsRect,
double rotation );
213 Q_DECL_DEPRECATED
static double scaleFactorFromItemStyle(
const QStyleOptionGraphicsItem *style )
SIP_DEPRECATED;
220 static double scaleFactorFromItemStyle(
const QStyleOptionGraphicsItem *style, QPainter *painter );
241 static double calculatePrettySize(
double minimumSize,
double maximumSize );
248 static bool itemIsAClippingSource(
const QgsLayoutItem *item );
255 static QVector< double > predefinedScales(
const QgsLayout *layout );
266 static double pointsToMM(
double pointSize );
272 static double mmToPoints(
double mmSize );
274 friend class TestQgsLayoutUtils;
Contains information about the context of a rendering operation.