mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-09 00:17:27 -05: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;
|
void updateFontForFormat( QFont &font, const QgsRenderContext &context, double scaleFactor = 1.0 ) const;
|
||||||
%Docstring
|
%Docstring
|
||||||
Updates the specified ``font`` in place, applying character formatting options which
|
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
|
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
|
: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.
|
* Sets the \a document and document \a metrics for the label.
|
||||||
|
*
|
||||||
* \see document()
|
* \see document()
|
||||||
* \since QGIS 3.14
|
* \since QGIS 3.14
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -196,7 +196,7 @@ class CORE_EXPORT QgsTextCharacterFormat
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the specified \a font in place, applying character formatting options which
|
* 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
|
* 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
|
* QgsTextRenderer::FONT_WORKAROUND_SCALE and then manually calculations
|
||||||
|
|||||||
@ -35,8 +35,6 @@ QgsTextDocumentMetrics QgsTextDocumentMetrics::calculateMetrics( const QgsTextDo
|
|||||||
// for absolute line heights
|
// for absolute line heights
|
||||||
const double lineHeightPainterUnits = context.convertToPainterUnits( format.lineHeight(), format.lineHeightUnit() );
|
const double lineHeightPainterUnits = context.convertToPainterUnits( format.lineHeight(), format.lineHeightUnit() );
|
||||||
|
|
||||||
// TODO orientation handling
|
|
||||||
|
|
||||||
double width = 0;
|
double width = 0;
|
||||||
double heightLabelMode = 0;
|
double heightLabelMode = 0;
|
||||||
double heightPointRectMode = 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).
|
* 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]; }
|
double characterHeight( int position ) const { return mCharacterHeights[position]; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the descent of the character at the specified position.
|
* Returns the descent of the character at the specified position.
|
||||||
|
*
|
||||||
|
* \since QGIS 3.28
|
||||||
*/
|
*/
|
||||||
double characterDescent( int position ) const { return mCharacterDescents[position]; }
|
double characterDescent( int position ) const { return mCharacterDescents[position]; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the maximum height of any character found in the text.
|
* Returns the maximum height of any character found in the text.
|
||||||
|
*
|
||||||
|
* \since QGIS 3.28
|
||||||
*/
|
*/
|
||||||
double maximumCharacterHeight() const { return mMaximumCharacterHeight; }
|
double maximumCharacterHeight() const { return mMaximumCharacterHeight; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the maximum descent of any character found in the text.
|
* Returns the maximum descent of any character found in the text.
|
||||||
|
*
|
||||||
|
* \since QGIS 3.28
|
||||||
*/
|
*/
|
||||||
double maximumCharacterDescent() const { return mMaximumCharacterDescent; }
|
double maximumCharacterDescent() const { return mMaximumCharacterDescent; }
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user