4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
15 #include "frontends/Painter.h"
19 #include <X11/Xft/Xft.h>
31 * GPainter - a painter implementation for Gtkmm
33 class GPainter : public Painter {
35 GPainter(GWorkArea &);
37 /// return the width of the work area in pixels
38 virtual int paperWidth() const;
39 /// return the height of the work area in pixels
40 virtual int paperHeight() const;
42 void setForeground(Glib::RefPtr<Gdk::GC> gc, LColor_color clr);
43 void setLineParam(Glib::RefPtr<Gdk::GC> gc,
44 line_style ls, line_width lw);
45 XftColor * getXftColor(LColor_color clr);
46 /// draw a line from point to point
51 line_style = line_solid,
52 line_width = line_thin);
55 * lines - draw a set of lines
56 * @param xp array of points' x co-ords
57 * @param yp array of points' y co-ords
58 * @param np size of the points array
65 line_style = line_solid,
66 line_width = line_thin);
69 virtual void rectangle(
73 line_style = line_solid,
74 line_width = line_thin);
76 /// draw a filled rectangle
77 virtual void fillRectangle(
82 /// draw a filled (irregular) polygon
83 virtual void fillPolygon(
92 unsigned int w, unsigned int h,
101 /// draw an image from the image cache
102 virtual void image(int x, int y,
104 graphics::Image const & image);
106 /// draw a string at position x, y (y is the baseline)
107 virtual void text(int x, int y,
108 std::string const & str, LyXFont const & f);
110 /** Draw a string at position x, y (y is the baseline)
111 * This is just for fast drawing
113 virtual void text(int x, int y,
114 char const * str, size_t l,
117 virtual void text(int x, int y, wchar_t const * str, int l,
120 /// draw a char at position x, y (y is the baseline)
121 virtual void text(int x, int y,
122 char c, LyXFont const & f);
124 /// draw a wide string at position x, y
125 void text(int x, int y,
126 XChar2b const * str, size_t l,
130 /// our owner who we paint upon
134 } // namespace frontend