Skip to content

Commit

Permalink
NEW added convenience functions JKQTMathTextNodeSize::getAscents() an…
Browse files Browse the repository at this point in the history
…d JKQTMathTextNodeSize::getHeight() to JKQTMathTextNodeSize
  • Loading branch information
jkriege2 committed Jan 10, 2024
1 parent 408f38d commit fe6ac0e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/jkqtmathtext/jkqtmathtexttools.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ struct JKQTMATHTEXT_LIB_EXPORT JKQTMathTextNodeSize {
double topXCorrection;
/** \brief calculate the descent (overallHeight-baselineHeight) */
inline double getDescent() const { return overallHeight-baselineHeight; }
/** \brief calculate the ascent (=baselineHeight), for convenience and naming */
inline double getAscent() const { return baselineHeight; }
/** \brief calculate the height (=baselineHeight), for convenience and naming */
inline double getHeight() const { return overallHeight; }
/** \brief calculate the overall size in floating-point precision */
inline QSizeF getSize() const { return QSizeF(width, overallHeight); }
/** \brief calculate the overall size in floating-point precision */
Expand Down

0 comments on commit fe6ac0e

Please sign in to comment.