9 #include "math_metricsinfo.h"
21 typedef MathArray::size_type size_type;
23 typedef MathArray::const_iterator const_iterator;
28 void metrics(MathMetricsInfo const & st) const;
30 void draw(Painter & pain, int x, int y) const;
33 int xo() const { return xo_; }
35 int yo() const { return yo_; }
37 int pos2x(size_type pos) const;
39 size_type x2pos(int pos) const;
40 /// returns distance of this cell to the point given by x and y
41 // assumes valid position and size cache
42 int dist(int x, int y) const;
45 int ascent() const { return ascent_; }
47 int descent() const { return descent_; }
49 int height() const { return ascent_ + descent_; }
51 int width() const { return width_; }
52 /// do we cover point(x, y)?
53 bool covers(int x, int y) const;
56 const_iterator begin() const { return data_.begin(); }
58 const_iterator end() const { return data_.end(); }
74 mutable MathMetricsInfo size_;
77 std::ostream & operator<<(std::ostream & os, MathXArray const & ar);