void QLPainter::point(int x, int y, LColor_color col)
{
+ if (!isDrawingEnabled())
+ return;
+
setQPainterPen(col);
drawPoint(x, y);
}
line_style ls,
line_width lw)
{
+ if (!isDrawingEnabled())
+ return;
+
setQPainterPen(col, ls, lw);
drawLine(x1, y1, x2, y2);
}
points[i].setY(yp[i]);
}
+ if (!isDrawingEnabled())
+ return;
+
setQPainterPen(col, ls, lw);
drawPolyline(points.get(), np);
}
line_style ls,
line_width lw)
{
+ if (!isDrawingEnabled())
+ return;
+
setQPainterPen(col, ls, lw);
drawRect(x, y, w, h);
}
void QLPainter::arc(int x, int y, unsigned int w, unsigned int h,
int a1, int a2, LColor_color col)
{
+ if (!isDrawingEnabled())
+ return;
+
// LyX usings 1/64ths degree, Qt usings 1/16th
setQPainterPen(col);
drawArc(x, y, w, h, a1 / 4, a2 / 4);
fillRectangle(x, y, w, h, LColor::graphicsbg);
+ if (!isDrawingEnabled())
+ return;
+
drawImage(x, y, qlimage.qimage(), 0, 0, w, h);
}
} else {
setFont(qfont);
}
- drawText(x + textwidth, y, c);
+ if (isDrawingEnabled())
+ drawText(x + textwidth, y, c);
textwidth += fontMetrics().width(c);
}
return textwidth;
setFont(fi.font);
// We need to draw the text as LTR as we use our own bidi code.
setLayoutDirection(Qt::LeftToRight);
- drawText(x, y, str);
+ if (isDrawingEnabled())
+ drawText(x, y, str);
// Here we use the font width cache instead of
// textwidth = fontMetrics().width(str);
// because the above is awfully expensive on MacOSX