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 docstring const & str, Font const & f);
95 /// draw a char at position x, y (y is the baseline)
96 virtual int text(int x, int y, char_type c, Font const & f);
99 /// draw small caps text
101 \return width of the drawn text.
103 int smallCapsText(int x, int y,
104 QString const & str, Font const & f);
106 /// set pen parameters
107 void setQPainterPen(Color_color col,
108 line_style ls = line_solid,
109 line_width lw = line_thin);
111 Color::color current_color_;
112 Painter::line_style current_ls_;
113 Painter::line_width current_lw_;
116 } // namespace frontend
119 #endif // QLPAINTER_H