mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
Address review
This commit is contained in:
parent
b606ce6d19
commit
8dbb654a55
@ -193,7 +193,7 @@ Sets whether the format has overline ``enabled``.
|
||||
void updateFontForFormat( QFont &font, const QgsRenderContext &context, double scaleFactor = 1.0 ) const;
|
||||
%Docstring
|
||||
Updates the specified ``font`` in place, applying character formatting options which
|
||||
are applicable on a font level.
|
||||
are applicable on a font level when rendered in the given ``context``.
|
||||
|
||||
The optional ``scaleFactor`` parameter can specify a font size scaling factor. It is recommended to set this to
|
||||
:py:class:`QgsTextRenderer`.FONT_WORKAROUND_SCALE and then manually calculations
|
||||
|
@ -119,6 +119,7 @@ class CORE_EXPORT QgsTextLabelFeature : public QgsLabelFeature
|
||||
|
||||
/**
|
||||
* Sets the \a document and document \a metrics for the label.
|
||||
*
|
||||
* \see document()
|
||||
* \since QGIS 3.14
|
||||
*/
|
||||
|
@ -196,7 +196,7 @@ class CORE_EXPORT QgsTextCharacterFormat
|
||||
|
||||
/**
|
||||
* Updates the specified \a font in place, applying character formatting options which
|
||||
* are applicable on a font level.
|
||||
* are applicable on a font level when rendered in the given \a context.
|
||||
*
|
||||
* The optional \a scaleFactor parameter can specify a font size scaling factor. It is recommended to set this to
|
||||
* QgsTextRenderer::FONT_WORKAROUND_SCALE and then manually calculations
|
||||
|
@ -35,8 +35,6 @@ QgsTextDocumentMetrics QgsTextDocumentMetrics::calculateMetrics( const QgsTextDo
|
||||
// for absolute line heights
|
||||
const double lineHeightPainterUnits = context.convertToPainterUnits( format.lineHeight(), format.lineHeightUnit() );
|
||||
|
||||
// TODO orientation handling
|
||||
|
||||
double width = 0;
|
||||
double heightLabelMode = 0;
|
||||
double heightPointRectMode = 0;
|
||||
|
@ -73,21 +73,29 @@ class CORE_EXPORT QgsPrecalculatedTextMetrics
|
||||
|
||||
/**
|
||||
* Returns the character height of the character at the specified position (actually font metrics height, not individual character height).
|
||||
*
|
||||
* \since QGIS 3.28
|
||||
*/
|
||||
double characterHeight( int position ) const { return mCharacterHeights[position]; }
|
||||
|
||||
/**
|
||||
* Returns the descent of the character at the specified position.
|
||||
*
|
||||
* \since QGIS 3.28
|
||||
*/
|
||||
double characterDescent( int position ) const { return mCharacterDescents[position]; }
|
||||
|
||||
/**
|
||||
* Returns the maximum height of any character found in the text.
|
||||
*
|
||||
* \since QGIS 3.28
|
||||
*/
|
||||
double maximumCharacterHeight() const { return mMaximumCharacterHeight; }
|
||||
|
||||
/**
|
||||
* Returns the maximum descent of any character found in the text.
|
||||
*
|
||||
* \since QGIS 3.28
|
||||
*/
|
||||
double maximumCharacterDescent() const { return mMaximumCharacterDescent; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user