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"
17 #include <X11/Xft/Xft.h>
30 * GPainter - a painter implementation for Gtkmm
32 class GPainter : public Painter {
34 GPainter(GWorkArea &);
36 /// return the width of the work area in pixels
37 virtual int paperWidth() const;
38 /// return the height of the work area in pixels
39 virtual int paperHeight() const;
41 void setForeground(Glib::RefPtr<Gdk::GC> gc, LColor_color clr);
42 void setLineParam(Glib::RefPtr<Gdk::GC> gc,
43 line_style ls, line_width lw);
44 XftColor * getXftColor(LColor_color clr);
45 /// draw a line from point to point
50 line_style = line_solid,
51 line_width = line_thin);
54 * lines - draw a set of lines
55 * @param xp array of points' x co-ords
56 * @param yp array of points' y co-ords
57 * @param np size of the points array
64 line_style = line_solid,
65 line_width = line_thin);
68 virtual void rectangle(
72 line_style = line_solid,
73 line_width = line_thin);
75 /// draw a filled rectangle
76 virtual void fillRectangle(
81 /// draw a filled (irregular) polygon
82 virtual void fillPolygon(
91 unsigned int w, unsigned int h,
100 /// draw an image from the image cache
101 virtual void image(int x, int y,
103 graphics::Image const & image);
105 /// draw a string at position x, y (y is the baseline)
106 virtual void text(int x, int y,
107 std::string const & str, LyXFont const & f);
109 /** Draw a string at position x, y (y is the baseline)
110 * This is just for fast drawing
112 virtual void text(int x, int y,
113 char const * str, size_t l,
116 virtual void text(int x, int y, wchar_t const * str, int l,
119 /// draw a char at position x, y (y is the baseline)
120 virtual void text(int x, int y,
121 char c, LyXFont const & f);
123 /// draw a wide string at position x, y
124 void text(int x, int y,
125 XChar2b const * str, size_t l,
129 /// our owner who we paint upon
133 } // namespace frontend