-#ifdef __GNUG__
-#pragma implementation
-#endif
#include "math_macroarg.h"
#include "math_macro.h"
void MathMacroArgument::metrics(MathMetricsInfo & mi) const
{
- if (expanded_) {
- xcell(0).metrics(mi);
- width_ = xcell(0).width();
- ascent_ = xcell(0).ascent();
- descent_ = xcell(0).descent();
- } else {
- mathed_string_dim(mi.base.font, str_, ascent_, descent_, width_);
- }
+ if (expanded_)
+ dim_ = cell(0).metrics(mi);
+ else
+ mathed_string_dim(mi.base.font, str_, dim_);
}
void MathMacroArgument::draw(MathPainterInfo & pi, int x, int y) const
{
if (expanded_)
- xcell(0).draw(pi, x, y);
+ cell(0).draw(pi, x, y);
else
drawStrRed(pi, x, y, str_);
}