]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_binaryopinset.C
preview as preview can...
[lyx.git] / src / mathed / math_binaryopinset.C
index 40fc662fbb0e1eee34a64f998969b5a722a896b6..aaac72a1867c19725d0153fe0f543e5af40dca4f 100644 (file)
@@ -5,19 +5,22 @@
 #endif
 
 #include "math_binaryopinset.h"
-#include "Painter.h"
+#include "MathPainterInfo.h"
 #include "support/LOstream.h"
 #include "math_support.h"
 #include "math_mathmlstream.h"
 
 
+using std::max;
+
+
 MathBinaryOpInset::MathBinaryOpInset(char op)
        : MathNestInset(2), op_(op)
 {}
 
 
 MathInset * MathBinaryOpInset::clone() const
-{   
+{
        return new MathBinaryOpInset(*this);
 }
 
@@ -28,22 +31,22 @@ int MathBinaryOpInset::opwidth() const
 }
 
 
-void MathBinaryOpInset::metrics(MathMetricsInfo const & mi) const
+void MathBinaryOpInset::metrics(MathMetricsInfo & mi) const
 {
        mi_ = mi;
        xcell(0).metrics(mi);
        xcell(1).metrics(mi);
        width_   = xcell(0).width() + xcell(1).width() + opwidth();
-       ascent_  = std::max(xcell(0).ascent(),  xcell(1).ascent());
-       descent_ = std::max(xcell(0).descent(), xcell(1).descent());
+       ascent_  = max(xcell(0).ascent(),  xcell(1).ascent());
+       descent_ = max(xcell(0).descent(), xcell(1).descent());
 }
 
 
-void MathBinaryOpInset::draw(Painter & pain, int x, int y) const
-{ 
-       xcell(0).draw(pain, x, y); 
+void MathBinaryOpInset::draw(MathPainterInfo & pain, int x, int y) const
+{
+       xcell(0).draw(pain, x, y);
        drawChar(pain, LM_TC_CONST, mi_, x + xcell(0).width() , y, op_);
-       xcell(1).draw(pain, x + width() - xcell(1).width(), y); 
+       xcell(1).draw(pain, x + width() - xcell(1).width(), y);
 }