4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS.
16 #include "frontends/Painter.h"
28 * XPainter - a painter implementation for Xlib
30 class XPainter : public Painter {
32 XPainter(XWorkArea &);
34 /// return the width of the work area in pixels
35 virtual int paperWidth() const;
36 /// return the height of the work area in pixels
37 virtual int paperHeight() const;
39 /// draw a line from point to point
44 line_style = line_solid,
45 line_width = line_thin);
48 * lines - draw a set of lines
49 * @param xp array of points' x co-ords
50 * @param yp array of points' y co-ords
51 * @param np size of the points array
58 line_style = line_solid,
59 line_width = line_thin);
62 virtual void rectangle(
66 line_style = line_solid,
67 line_width = line_thin);
69 /// draw a filled rectangle
70 virtual void fillRectangle(
75 /// draw a filled (irregular) polygon
76 virtual void fillPolygon(
85 unsigned int w, unsigned int h,
94 /// draw an image from the image cache
95 virtual void image(int x, int y,
97 graphics::Image const & image);
99 /// draw a string at position x, y (y is the baseline)
100 virtual void text(int x, int y,
101 std::string const & str, LyXFont const & f);
103 /** Draw a string at position x, y (y is the baseline)
104 * This is just for fast drawing
106 virtual void text(int x, int y,
107 char const * str, size_t l,
110 /// draw a char at position x, y (y is the baseline)
111 virtual void text(int x, int y,
112 char c, LyXFont const & f);
114 /// draw a wide string at position x, y
115 void text(int x, int y,
116 XChar2b const * str, size_t l,
120 /// our owner who we paint upon
124 } // namespace frontend