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>
29 * GPainter - a painter implementation for Gtkmm
31 class GPainter : public Painter {
33 GPainter(GWorkArea &);
35 /// return the width of the work area in pixels
36 virtual int paperWidth() const;
37 /// return the height of the work area in pixels
38 virtual int paperHeight() const;
40 void setForeground(Glib::RefPtr<Gdk::GC> gc, LColor_color clr);
41 void setLineParam(Glib::RefPtr<Gdk::GC> gc,
42 line_style ls, line_width lw);
43 XftColor * getXftColor(LColor_color clr);
44 /// draw a line from point to point
49 line_style = line_solid,
50 line_width = line_thin);
53 * lines - draw a set of lines
54 * @param xp array of points' x co-ords
55 * @param yp array of points' y co-ords
56 * @param np size of the points array
63 line_style = line_solid,
64 line_width = line_thin);
67 virtual void rectangle(
71 line_style = line_solid,
72 line_width = line_thin);
74 /// draw a filled rectangle
75 virtual void fillRectangle(
80 /// draw a filled (irregular) polygon
81 virtual void fillPolygon(
90 unsigned int w, unsigned int h,
99 /// draw an image from the image cache
100 virtual void image(int x, int y,
102 graphics::Image const & image);
104 /// draw a string at position x, y (y is the baseline)
105 virtual void text(int x, int y,
106 std::string const & str, LyXFont const & f);
108 /** Draw a string at position x, y (y is the baseline)
109 * This is just for fast drawing
111 virtual void text(int x, int y,
112 char const * str, size_t l,
115 virtual void text(int x, int y, wchar_t const * str, int l,
118 /// draw a char at position x, y (y is the baseline)
119 virtual void text(int x, int y,
120 char c, LyXFont const & f);
122 /// draw a wide string at position x, y
123 void text(int x, int y,
124 XChar2b const * str, size_t l,
128 /// our owner who we paint upon
132 } // namespace frontend