]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.C
remove obsolete comment
[lyx.git] / src / TextMetrics.C
index 7cc99b09050fa10834b224c6830fdf204b6f1b43..9b9876d3b79127e3483e016e4262d7e9a6eac269 100644 (file)
@@ -919,6 +919,26 @@ pos_type TextMetrics::getColumnNearX(pit_type const pit,
 }
 
 
+pos_type TextMetrics::x2pos(pit_type pit, int row, int x) const
+{
+       ParagraphMetrics const & pm = parMetrics(pit);
+       BOOST_ASSERT(!pm.rows().empty());
+       BOOST_ASSERT(row < int(pm.rows().size()));
+       bool bound = false;
+       Row const & r = pm.rows()[row];
+       return r.pos() + getColumnNearX(pit, r, x, bound);
+}
+
+
+//int LyXText::pos2x(pit_type pit, pos_type pos) const
+//{
+//     ParagraphMetrics const & pm = parMetrics(pit);
+//     Row const & r = pm.rows()[row];
+//     int x = 0;
+//     pos -= r.pos();
+//}
+
+
 int defaultRowHeight()
 {
        return int(theFontMetrics(LyXFont(LyXFont::ALL_SANE)).maxHeight() *  1.2);