RowPainter::RowPainter(PainterInfo & pi,
Text const & text, pit_type pit, Row const & row, Bidi & bidi, int x, int y)
- : pi_(pi_), text_(text),
+ : pi_(pi), text_(text),
text_metrics_(pi_.base.bv->textMetrics(&text)),
pars_(text.paragraphs()),
row_(row), pit_(pit), par_(text.paragraphs()[pit]),
int RowPainter::leftMargin() const
{
- return text_.leftMargin(pi_.base.bv->buffer(), text_metrics_.width(), pit_,
+ return text_metrics_.leftMargin(text_metrics_.width(), pit_,
row_.pos());
}
pi_.pain.line(int(x_), y1, int(x_), y0, Color::added_space);
- if (par_.hfillExpansion(row_, pos)) {
+ if (pm_.hfillExpansion(row_, pos)) {
int const y2 = (y0 + y1) / 2;
if (pos >= body_pos) {
if (start == end || !par_.isChanged(start, end))
return;
- int const height = text_.isLastRow(pit_, row_)
+ int const height = text_metrics_.isLastRow(pit_, row_)
? row_.ascent()
: row_.height();
return;
depth_type prev_depth = 0;
- if (!text_.isFirstRow(pit_, row_)) {
+ if (!text_metrics_.isFirstRow(pit_, row_)) {
pit_type pit2 = pit_;
if (row_.pos() == 0)
--pit2;
}
depth_type next_depth = 0;
- if (!text_.isLastRow(pit_, row_)) {
+ if (!text_metrics_.isLastRow(pit_, row_)) {
pit_type pit2 = pit_;
if (row_.endpos() >= pars_[pit2].size())
++pit2;