Mercurial > octave
annotate libinterp/corefcn/base-text-renderer.h @ 22326:71dd9d5a5ecd
move more new classes inside octave namespace
* base-text-renderer.h, ft-text-renderer.cc, ft-text-renderer.h,
gl-render.cc, gl-render.h, gl2ps-print.cc, gl2ps-print.h,
oct-stream.cc, text-renderer.cc, text-renderer.h, ov-java.cc, xzip.cc:
Move classes inside octave namespace.
* GLCanvas.cc, gl-select.cc, gl-select.h, graphics.cc, graphics.in.h,
__init_fltk__.cc, __osmesa_print__.cc: Update.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 17 Aug 2016 02:57:50 -0400 |
parents | bac0d6f07a3e |
children | b81b08cc4c83 |
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 | |
22326
71dd9d5a5ecd
move more new classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
38 namespace octave |
71dd9d5a5ecd
move more new classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
39 { |
71dd9d5a5ecd
move more new classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
40 |
21209 | 41 class |
42 base_text_renderer : public text_processor | |
43 { | |
44 public: | |
45 | |
46 base_text_renderer (void) : text_processor () { } | |
47 | |
48 virtual ~base_text_renderer (void) { } | |
49 | |
50 virtual Matrix | |
51 get_extent (text_element *elt, double rotation) = 0; | |
52 | |
53 virtual Matrix | |
54 get_extent (const std::string& txt, double rotation, | |
55 const caseless_str& interpreter) = 0; | |
56 | |
57 virtual void | |
58 set_font (const std::string& name, const std::string& weight, | |
59 const std::string& angle, double size) = 0; | |
60 | |
61 virtual void set_color (const Matrix& c) = 0; | |
62 | |
63 virtual void | |
64 text_to_pixels (const std::string& txt, uint8NDArray& pxls, | |
65 Matrix& bbox, int halign, int valign, double rotation, | |
66 const caseless_str& interpreter, | |
67 bool handle_rotation) = 0; | |
68 | |
69 virtual void | |
70 text_to_strlist (const std::string& txt, | |
71 std::list<text_renderer::string>& lst, | |
72 Matrix& box, int halign, int valign, double rotation, | |
73 const caseless_str& interpreter = "tex") = 0; | |
74 | |
75 private: | |
76 | |
77 // No copying! | |
78 | |
79 base_text_renderer (const base_text_renderer&); | |
80 | |
81 base_text_renderer& operator = (const base_text_renderer&); | |
82 }; | |
83 | |
22326
71dd9d5a5ecd
move more new classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
84 } |
71dd9d5a5ecd
move more new classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
85 |
21209 | 86 #endif |