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.
29 * QLPainter - a painter implementation for Qt4
31 class QLPainter : public QPainter, public Painter {
33 QLPainter(QPaintDevice *);
36 /// draw a line from point to point
41 line_style = line_solid,
42 line_width = line_thin);
45 * lines - draw a set of lines
46 * @param xp array of points' x co-ords
47 * @param yp array of points' y co-ords
48 * @param np size of the points array
55 line_style = line_solid,
56 line_width = line_thin);
59 virtual void rectangle(
63 line_style = line_solid,
64 line_width = line_thin);
66 /// draw a filled rectangle
67 virtual void fillRectangle(
75 unsigned int w, unsigned int h,
84 /// draw an image from the image cache
85 virtual void image(int x, int y,
87 lyx::graphics::Image const & image);
89 /// draw a string at position x, y (y is the baseline)
90 virtual int text(int x, int y,
91 lyx::docstring const & str, LyXFont const & f);
93 /** Draw a string at position x, y (y is the baseline)
94 * This is just for fast drawing
96 virtual int text(int x, int y,
97 lyx::char_type const * str, size_t l,
100 /// draw a char at position x, y (y is the baseline)
101 virtual int text(int x, int y,
102 lyx::char_type c, LyXFont const & f);
105 /// draw small caps text
107 \return width of the drawn text.
109 int smallCapsText(int x, int y,
110 QString const & str, LyXFont const & f);
112 /// set pen parameters
113 void setQPainterPen(LColor_color col,
114 line_style ls = line_solid,
115 line_width lw = line_thin);
117 LColor::color current_color_;
118 Painter::line_style current_ls_;
119 Painter::line_width current_lw_;
122 } // namespace frontend
125 #endif // QLPAINTER_H