4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * \author Jean-Marc Lasgouttes
11 * Full author contact details are available in file CREDITS.
24 * NullPainter - A painter instance that does nothing
26 class NullPainter : public Painter {
28 NullPainter() : Painter(1, false) {}
32 /// draw a line from point to point
33 void line(int, int, int, int, Color,
34 line_style = line_solid, int = thin_line) {}
37 void lines(int const *, int const *, int, Color,
38 fill_style = fill_none, line_style = line_solid,
42 void path(int const *, int const *, int const *, int const *,
43 int const *, int const *, int, Color,
44 fill_style = fill_none, line_style = line_solid, int = thin_line) {}
47 void rectangle(int, int, int, int, Color,
48 line_style = line_solid, int = thin_line) {}
50 /// draw a filled rectangle
51 void fillRectangle(int, int, int, int, Color) {}
54 void arc(int, int, unsigned int, unsigned int, int, int, Color) {}
57 void point(int, int, Color) {}
59 /// draw an image from the image cache
60 void image(int, int, int, int, graphics::Image const &) {}
63 void text(int, int, docstring const &, FontInfo const &) {}
66 void text(int, int, char_type, FontInfo const &) {}
69 void text(int, int, docstring const &, Font const &, double, double) {}
72 void text(int, int, docstring const &, Font const &,
73 Color, size_type, size_type, double, double) {}
75 /// This painter does not paint
76 bool isNull() const { return true; }
78 /// draw the underbar, strikeout, xout, uuline and uwave font attributes
79 void textDecoration(FontInfo const &, int, int, int) {}
82 * Draw a string and enclose it inside a rectangle. If
83 * back color is specified, the background is cleared with
84 * the given color. If frame is specified, a thin frame is drawn
85 * around the text with the given color.
87 void rectText(int, int, docstring const &,
88 FontInfo const &, Color, Color) {}
90 /// draw a string and enclose it inside a button frame
91 void buttonText(int, int, docstring const &,
92 FontInfo const &, Color, Color, int) {}
94 /// draw a character of a preedit string for cjk support.
95 int preeditText(int, int, char_type, FontInfo const &,
96 preedit_style) { return 0; }
98 /// start monochrome painting mode, i.e. map every color a shade of \c blend.
99 void enterMonochromeMode(Color const &) {}
100 /// leave monochrome painting mode
101 void leaveMonochromeMode() {}
102 /// draws a wavy line that can be used for underlining.
103 void wavyHorizontalLine(int, int, int, ColorCode) {}
106 } // namespace frontend
109 #endif // NULLPAINTER_H