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) override {}
37 void lines(int const *, int const *, int, Color,
38 fill_style = fill_none, line_style = line_solid,
39 int = thin_line) override {}
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) override {}
47 void rectangle(int, int, int, int, Color,
48 line_style = line_solid, int = thin_line) override {}
50 /// draw a filled rectangle
51 void fillRectangle(int, int, int, int, Color) override {}
54 void arc(int, int, unsigned int, unsigned int, int, int, Color) override {}
57 void ellipse(double, double, double, double, Color,
58 fill_style = fill_none, line_style = line_solid,
59 int = thin_line) override {}
62 void point(int, int, Color) override {}
64 /// draw an image from the image cache
65 void image(int, int, int, int, graphics::Image const &, bool) override {}
68 void text(int, int, docstring const &, FontInfo const &) override {}
71 void text(int, int, char_type, FontInfo const &) override {}
74 void text(int, int, docstring const &, Font const &, double, double) override {}
77 void text(int, int, docstring const &, Font const &,
78 Color, size_type, size_type, double, double) override {}
80 /// This painter does not paint
81 bool isNull() const override { return true; }
83 /// draw the underbar, strikeout, xout, uuline and uwave font attributes
84 void textDecoration(FontInfo const &, int, int, int) override {}
87 * Draw a string and enclose it inside a rectangle. If
88 * back color is specified, the background is cleared with
89 * the given color. If frame is specified, a thin frame is drawn
90 * around the text with the given color.
92 void rectText(int, int, docstring const &,
93 FontInfo const &, Color, Color) override {}
95 /// draw a string and enclose it inside a button frame
96 void buttonText(int, int, docstring const &,
97 FontInfo const &, Color, Color, int) override {}
99 /// draw a character of a preedit string for cjk support.
100 int preeditText(int, int, char_type, FontInfo const &,
101 preedit_style) override { return 0; }
103 /// start monochrome painting mode, i.e. map every color a shade of \c blend.
104 void enterMonochromeMode(Color const &) override {}
105 /// leave monochrome painting mode
106 void leaveMonochromeMode() override {}
107 /// draws a wavy line that can be used for underlining.
108 void wavyHorizontalLine(FontInfo const &, int, int, int, ColorCode) override {}
111 } // namespace frontend
114 #endif // NULLPAINTER_H