}
+int BufferView::inPixels(Length const & len) const
+{
+ Font const font = buffer().params().getFont();
+ return len.inPixels(workWidth(), theFontMetrics(font).em());
+}
+
+
bool BufferView::isTopScreen() const
{
return 0 == d->scrollbarParameters_.min;
class FuncStatus;
class Intl;
class Inset;
+class Length;
class PainterInfo;
class ParIterator;
class ParagraphMetrics;
/// left margin
int leftMargin() const;
+ /// return the on-screen size of this length
+ /*
+ * This is a wrapper around Length::inPixels that uses the
+ * bufferview width as width and the EM value of the default
+ * document font.
+ */
+ int inPixels(Length const & len) const;
+
/// \return true if the BufferView is at the top of the document.
bool isTopScreen() const;
* FontMetrics::em() to get this value.
*/
int inPixels(int text_width, int em_width = 0) const;
+
/** return the on-screen size of this length
*
- * This version of the function uses the right EM definition.
+ * This version of the function uses the current inset width as
+ * width and the EM value of the current font.
*/
int inPixels(MetricsBase const &) const;
/// return the value in Big Postscript points.
return 3 * default_height;
case LENGTH:
- return len_.len().inPixels(bv.workWidth());
+ return bv.inPixels(len_.len());
default:
LATTEST(false);