GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
base-text-renderer.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2016-2017 John W. Eaton
4 Copyright (C) 2009-2016 Michael Goffioul
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 
27 #include "octave-config.h"
28 
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 namespace octave
39 {
40  class
42  {
43  public:
44 
46 
47  virtual ~base_text_renderer (void) { }
48 
49  virtual Matrix
50  get_extent (text_element *elt, double rotation) = 0;
51 
52  virtual Matrix
53  get_extent (const std::string& txt, double rotation,
54  const caseless_str& interpreter) = 0;
55 
56  virtual void
57  set_font (const std::string& name, const std::string& weight,
58  const std::string& angle, double size) = 0;
59 
60  virtual void set_color (const Matrix& c) = 0;
61 
62  virtual void
63  text_to_pixels (const std::string& txt, uint8NDArray& pxls,
64  Matrix& bbox, int halign, int valign, double rotation,
66  bool handle_rotation) = 0;
67 
68  virtual void
69  text_to_strlist (const std::string& txt,
70  std::list<text_renderer::string>& lst,
71  Matrix& box, int halign, int valign, double rotation,
72  const caseless_str& interpreter = "tex") = 0;
73 
74  private:
75 
76  // No copying!
77 
79 
80  base_text_renderer& operator = (const base_text_renderer&);
81  };
82 }
83 
84 #endif
Octave interface to the compression and uncompression libraries.
Definition: aepbalance.cc:47
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable name
Definition: input.cc:871
Definition: dMatrix.h:37
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
Definition: lu.cc:138
static octave_value box(JNIEnv *jni_env, void *jobj, void *jcls_arg=0)
Convert the Java object pointed to by jobj_arg with class jcls_arg to an Octave value.
Definition: ov-java.cc:1192
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable or any other valid Octave code The number of return their size
Definition: input.cc:871
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition: utils.cc:854