Painter() : drawing_enabled_(true) {}
float line_width;
+ static const float thin_line;
/// possible line styles
enum line_style {
/// draw a line from point to point
virtual void line(int x1, int y1, int x2, int y2, Color,
- line_style = line_solid, float line_width = 0.5) = 0;
+ line_style = line_solid, float line_width = thin_line) = 0;
/**
* lines - draw a set of lines
* @param np size of the points array
*/
virtual void lines(int const * xp, int const * yp, int np, Color,
- line_style = line_solid, float line_width = 0.5) = 0;
+ line_style = line_solid, float line_width = thin_line) = 0;
/// draw a rectangle
virtual void rectangle(int x, int y, int w, int h, Color,
- line_style = line_solid, float line_width = 0.5) = 0;
+ line_style = line_solid, float line_width = thin_line) = 0;
/// draw a filled rectangle
virtual void fillRectangle(int x, int y, int w, int h, Color) = 0;
namespace lyx {
namespace frontend {
+
+const float Painter::thin_line = 0.5;
GuiPainter::GuiPainter(QPaintDevice * device)
: QPainter(device), Painter(),
// new QPainter has default QPen:
current_color_ = guiApp->colorCache().get(Color_black);
current_ls_ = line_solid;
- current_lw_ = 0.5;
+ current_lw_ = thin_line;
}
int x2, int y2,
Color,
line_style = line_solid,
- float line_width = 0.5);
+ float line_width = thin_line);
/**
* lines - draw a set of lines
int np,
Color,
line_style = line_solid,
- float line_width = 0.5);
+ float line_width = thin_line);
/// draw a rectangle
virtual void rectangle(
int w, int h,
Color,
line_style = line_solid,
- float line_width = 0.5);
+ float line_width = thin_line);
/// draw a filled rectangle
virtual void fillRectangle(
/// set pen parameters
void setQPainterPen(QColor const & col,
- line_style ls = line_solid, float lw = 0.5);
+ line_style ls = line_solid, float lw = thin_line);
QColor current_color_;
Painter::line_style current_ls_;