4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Abdelrazak Younes
10 * Full author contact details are available in file CREDITS.
16 #include "frontends/Painter.h"
31 * QLPainter - a painter implementation for Qt4
33 class QLPainter : public QPainter, public Painter {
35 QLPainter(QPaintDevice *);
38 /// draw a line from point to point
43 line_style = line_solid,
44 line_width = line_thin);
47 * lines - draw a set of lines
48 * @param xp array of points' x co-ords
49 * @param yp array of points' y co-ords
50 * @param np size of the points array
57 line_style = line_solid,
58 line_width = line_thin);
61 virtual void rectangle(
65 line_style = line_solid,
66 line_width = line_thin);
68 /// draw a filled rectangle
69 virtual void fillRectangle(
77 unsigned int w, unsigned int h,
86 /// draw an image from the image cache
87 virtual void image(int x, int y,
89 lyx::graphics::Image const & image);
91 /// draw a string at position x, y (y is the baseline)
92 virtual int text(int x, int y,
93 lyx::docstring const & str, LyXFont const & f);
95 /// draw a char at position x, y (y is the baseline)
96 virtual int text(int x, int y,
97 lyx::char_type c, LyXFont const & f);
100 /// draw small caps text
102 \return width of the drawn text.
104 int smallCapsText(int x, int y,
105 QString const & str, LyXFont const & f);
107 /// set pen parameters
108 void setQPainterPen(LColor_color col,
109 line_style ls = line_solid,
110 line_width lw = line_thin);
112 LColor::color current_color_;
113 Painter::line_style current_ls_;
114 Painter::line_width current_lw_;
117 } // namespace frontend
120 #endif // QLPAINTER_H