]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_biginset.C
Jean-Marc's fix for wrong descent
[lyx.git] / src / mathed / math_biginset.C
index 896310a9a19046e3ff2eac70978d80064c500529..07f91c8ccc0dfcaae00112259aa4bfde3b7ad3bc 100644 (file)
@@ -1,8 +1,5 @@
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "math_biginset.h"
 #include "math_support.h"
@@ -17,12 +14,12 @@ MathBigInset::MathBigInset(string const & name, string const & delim)
 
 
 MathInset * MathBigInset::clone() const
-{   
+{
        return new MathBigInset(*this);
 }
 
 
-int MathBigInset::size() const
+MathBigInset::size_type MathBigInset::size() const
 {
        return name_.size() - 4;
 }
@@ -40,19 +37,19 @@ double MathBigInset::increase() const
 }
 
 
-void MathBigInset::metrics(MathMetricsInfo const & mi) const
+void MathBigInset::metrics(MathMetricsInfo & mi) const
 {
-       double h = mathed_char_height(LM_TC_VAR, mi, 'I', ascent_, descent_);  
-       double f = increase();
-       width_   = 6;
-       ascent_  = int(h + f * h);
-       descent_ = int(f * h);
+       double const h = mathed_char_ascent(mi.base.font, 'I');
+       double const f = increase();
+       dim_.w = 6;
+       dim_.a = int(h + f * h);
+       dim_.d = int(f * h);
 }
 
 
-void MathBigInset::draw(Painter & pain, int x, int y) const
-{ 
-       mathed_draw_deco(pain, x + 1, y - ascent_, 4, height(), delim_);
+void MathBigInset::draw(MathPainterInfo & pi, int x, int y) const
+{
+       mathed_draw_deco(pi, x + 1, y - ascent(), 4, height(), delim_);
 }
 
 
@@ -64,5 +61,5 @@ void MathBigInset::write(WriteStream & os) const
 
 void MathBigInset::normalize(NormalStream & os) const
 {
-       os << "[" << name_ << ' ' <<  delim_ << ']';
+       os << '[' << name_ << ' ' <<  delim_ << ']';
 }