mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 01:51:49 +08:00
JKQTMathText: added JKATMathTextNode::getSize()-Variant with struct return value
This commit is contained in:
parent
715aa4e7d9
commit
f7ad259aeb
@ -361,3 +361,10 @@ void JKQTMathTextMultiChildNode::setDrawBoxes(bool draw)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JKQTMathTextNodeSize JKQTMathTextNode::getSize(QPainter &painter, JKQTMathTextEnvironment currentEv, const JKQTMathTextNodeSize *prevNodeSize)
|
||||||
|
{
|
||||||
|
JKQTMathTextNodeSize s;
|
||||||
|
getSize(painter, currentEv, s.width, s.baselineHeight, s.overallHeight, s.strikeoutPos, prevNodeSize);
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
@ -52,6 +52,14 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathTextNode {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void getSize(QPainter& painter, JKQTMathTextEnvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos, const JKQTMathTextNodeSize* prevNodeSize=nullptr);
|
void getSize(QPainter& painter, JKQTMathTextEnvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos, const JKQTMathTextNodeSize* prevNodeSize=nullptr);
|
||||||
|
/** \brief determine the size of the node, calls getSizeInternal() implementation of the actual type \see getSizeInternal()
|
||||||
|
*
|
||||||
|
* \param painter painter to use for determining the size
|
||||||
|
* \param currentEv current environment object
|
||||||
|
* \param[in] prevNodeSize optional parameter, describing the size of the previous node (on the left). This may be used for layout of some nodes (e.g. sub/super to move correctly next to large parantheses ...)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
JKQTMathTextNodeSize getSize(QPainter& painter, JKQTMathTextEnvironment currentEv, const JKQTMathTextNodeSize* prevNodeSize=nullptr);
|
||||||
/** \brief calculates the x-size-difference between the given (probably) italic (width externally calculated: \a width_potentiallyitalic, \a ev_potentiallyitalic) and the non-italic version of \a child */
|
/** \brief calculates the x-size-difference between the given (probably) italic (width externally calculated: \a width_potentiallyitalic, \a ev_potentiallyitalic) and the non-italic version of \a child */
|
||||||
double getNonItalicXCorretion(QPainter &painter, double width_potentiallyitalic, const JKQTMathTextEnvironment &ev_potentiallyitalic, JKQTMathTextNode* child) const;
|
double getNonItalicXCorretion(QPainter &painter, double width_potentiallyitalic, const JKQTMathTextEnvironment &ev_potentiallyitalic, JKQTMathTextNode* child) const;
|
||||||
/** \brief draw the contents at the designated position
|
/** \brief draw the contents at the designated position
|
||||||
|
Loading…
Reference in New Issue
Block a user