Mercurial > octave
annotate libinterp/corefcn/base-text-renderer.h @ 22323:bac0d6f07a3e
maint: Update copyright notices for 2016.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 17 Aug 2016 01:05:19 -0400 |
parents | 1473547f50f5 |
children | 71dd9d5a5ecd |
rev | line source |
---|---|
21209 | 1 /* |
2 | |
3 Copyright (C) 2016 John W. Eaton | |
22323
bac0d6f07a3e
maint: Update copyright notices for 2016.
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
4 Copyright (C) 2009-2016 Michael Goffioul |
21209 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
10 Free Software Foundation; either version 3 of the License, or (at your | |
11 option) any later version. | |
12 | |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
19 along with Octave; see the file COPYING. If not, see | |
20 <http://www.gnu.org/licenses/>. | |
21 | |
22 */ | |
23 | |
24 #if ! defined (octave_base_text_renderer_h) | |
25 #define octave_base_text_renderer_h 1 | |
26 | |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21209
diff
changeset
|
27 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21209
diff
changeset
|
28 |
21209 | 29 #include <list> |
30 #include <string> | |
31 | |
32 #include "dMatrix.h" | |
33 #include "uint8NDArray.h" | |
34 | |
35 #include "text-renderer.h" | |
36 #include "txt-eng.h" | |
37 | |
38 class | |
39 base_text_renderer : public text_processor | |
40 { | |
41 public: | |
42 | |
43 base_text_renderer (void) : text_processor () { } | |
44 | |
45 virtual ~base_text_renderer (void) { } | |
46 | |
47 virtual Matrix | |
48 get_extent (text_element *elt, double rotation) = 0; | |
49 | |
50 virtual Matrix | |
51 get_extent (const std::string& txt, double rotation, | |
52 const caseless_str& interpreter) = 0; | |
53 | |
54 virtual void | |
55 set_font (const std::string& name, const std::string& weight, | |
56 const std::string& angle, double size) = 0; | |
57 | |
58 virtual void set_color (const Matrix& c) = 0; | |
59 | |
60 virtual void | |
61 text_to_pixels (const std::string& txt, uint8NDArray& pxls, | |
62 Matrix& bbox, int halign, int valign, double rotation, | |
63 const caseless_str& interpreter, | |
64 bool handle_rotation) = 0; | |
65 | |
66 virtual void | |
67 text_to_strlist (const std::string& txt, | |
68 std::list<text_renderer::string>& lst, | |
69 Matrix& box, int halign, int valign, double rotation, | |
70 const caseless_str& interpreter = "tex") = 0; | |
71 | |
72 private: | |
73 | |
74 // No copying! | |
75 | |
76 base_text_renderer (const base_text_renderer&); | |
77 | |
78 base_text_renderer& operator = (const base_text_renderer&); | |
79 }; | |
80 | |
81 #endif |