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"
25 * XPainter - a painter implementation for Xlib
27 class XPainter : public Painter {
29 XPainter(XWorkArea &);
31 /// return the width of the work area in pixels
32 virtual int paperWidth() const;
33 /// return the height of the work area in pixels
34 virtual int paperHeight() const;
36 /// draw a line from point to point
37 virtual Painter & line(
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
50 virtual Painter & lines(
55 line_style = line_solid,
56 line_width = line_thin);
59 virtual Painter & rectangle(
63 line_style = line_solid,
64 line_width = line_thin);
66 /// draw a filled rectangle
67 virtual Painter & fillRectangle(
72 /// draw a filled (irregular) polygon
73 virtual Painter & fillPolygon(
80 virtual Painter & arc(
82 unsigned int w, unsigned int h,
87 virtual Painter & point(
91 /// draw an image from the image cache
92 virtual Painter & image(int x, int y,
94 lyx::graphics::Image const & image);
96 /// draw a string at position x, y (y is the baseline)
97 virtual Painter & text(int x, int y,
98 std::string const & str, LyXFont const & f);
100 /** Draw a string at position x, y (y is the baseline)
101 * This is just for fast drawing
103 virtual Painter & text(int x, int y,
104 char const * str, size_t l,
107 /// draw a char at position x, y (y is the baseline)
108 virtual Painter & text(int x, int y,
109 char c, LyXFont const & f);
111 /// draw a wide string at position x, y
112 Painter & text(int x, int y,
113 XChar2b const * str, size_t l,
117 /// our owner who we paint upon