Mercurial > hg > octave-lyh
annotate libinterp/corefcn/xdiv.h @ 17280:8ce6cdd272eb
Support TeX elements in FreeType renderer.
* libinterp/corefcn/txt-eng.cc: New file. Contains mapping from symbol
name to character code, in Unicode and MS symbol.
* libinterp/corefcn/modules.mk (COREFCN_SRC): Add txt-eng.cc.
* libinterp/corefcn/oct-tex-lexer.ll: Add "\n" to rules applicable to
".", as
the latter does not include new line characters.
* libinterp/corefcn/oct-tex-parser.yy: Remove debug statements.
* libinterp/corefcn/txt-eng.ft.cc (gripe_missing_glyph,
gripe_glyph_render): Change signature from char to FT_ULong.
(ft_render::ft_render): Adapt to new/removed members.
(ft_render::~ft_render): Remove use of fonts member.
(ft_render::set_font): Likewise. Use font instead.
(ft_render::push_new_line): Likewise. Change meaning of yoffset and
initialize line_yoffset.
(ft_render::update_line_bbox): New method.
(ft_render::set_mode): Change meaning of yoffset and initialize
line_yoffset.
(ft_render::process_character): New method.
(ft_render::visit(text_element_string)): Use it.
(ft_render::visit(text_element_list),
ft_render::visit(text_element_subscript),
ft_render::visit(text_element_superscript),
ft_render::visit(text_element_color),
ft_render::visit(text_element_fontsize),
ft_render::visit(text_element_fontname),
ft_render::visit(text_element_fontstyle),
ft_render::visit(text_element_symbol)): New methods.
(ft_render::set_color): Use color member instead of red/green/blue.
* libinterp/corefcn/txt-eng-ft.h (ft_render::visit(text_element_list),
ft_render::visit(text_element_subscript),
ft_render::visit(text_element_superscript),
ft_render::visit(text_element_color),
ft_render::visit(text_element_fontsize),
ft_render::visit(text_element_fontname),
ft_render::visit(text_element_fontstyle),
ft_render::visit(text_element_symbol)): New methods.
(ft_render::update_line_bbox, ft_render::process_character): New
methods.
(ft_render::current_face): Removed method.i
(ft_render::font): New member, replaces obsolete ft_render::fonts.
(ft_render::line_yoffset): New member.
(ft_render::color): New member, replaces obsolete red, green and blue.
(ft_render::ft_font::ft_font()): Implement default constructor.
(ft_render::ft_font::operator=): Fix incorrect use of FT_Reference_Face
return value.
(ft_render::ft_font::is_valid): New method.
* libinterp/corefcn/txt-eng.h (class text_element_symbol, class
text_element_fontname, class text_element_fontsize, class
text_element_fontname, class text_element_fontstyle, class
text_element_color): Add forward definition.
(text_element_symbol::invalid_code): New enum.
(text_element_symbol::code): New member.
(text_element_symbol::text_element_symbol): Initialize it.
(text_element_symbol::get_symbol_code): New method.
(text_element_fontstyle::get_fontstyle): New method.
(text_element_fontname::get_fontname): Renamed from fontname.
(text_element_fontsize::get_fontsize): Renamed from fontsize.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Sun, 18 Aug 2013 16:36:46 -0400 |
parents | 68fc671a9339 |
children |
rev | line source |
---|---|
1 | 1 /* |
2 | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
11586
diff
changeset
|
3 Copyright (C) 1993-2012 John W. Eaton |
8920 | 4 Copyright (C) 2008 Jaroslav Hajek |
1 | 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 | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
1 | 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 | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
1 | 21 |
22 */ | |
23 | |
383 | 24 #if !defined (octave_xdiv_h) |
25 #define octave_xdiv_h 1 | |
1 | 26 |
9661
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
27 #include "mx-defs.h" |
5785 | 28 #include "MatrixType.h" |
1651 | 29 |
5785 | 30 extern Matrix xdiv (const Matrix& a, const Matrix& b, MatrixType &typ); |
31 extern ComplexMatrix xdiv (const Matrix& a, const ComplexMatrix& b, | |
10313 | 32 MatrixType &typ); |
5785 | 33 extern ComplexMatrix xdiv (const ComplexMatrix& a, const Matrix& b, |
10313 | 34 MatrixType &typ); |
5785 | 35 extern ComplexMatrix xdiv (const ComplexMatrix& a, const ComplexMatrix& b, |
10313 | 36 MatrixType &typ); |
1 | 37 |
1800 | 38 extern Matrix x_el_div (double a, const Matrix& b); |
39 extern ComplexMatrix x_el_div (double a, const ComplexMatrix& b); | |
40 extern ComplexMatrix x_el_div (const Complex a, const Matrix& b); | |
41 extern ComplexMatrix x_el_div (const Complex a, const ComplexMatrix& b); | |
1 | 42 |
4543 | 43 extern NDArray x_el_div (double a, const NDArray& b); |
44 extern ComplexNDArray x_el_div (double a, const ComplexNDArray& b); | |
45 extern ComplexNDArray x_el_div (const Complex a, const NDArray& b); | |
46 extern ComplexNDArray x_el_div (const Complex a, const ComplexNDArray& b); | |
47 | |
9661
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
48 extern Matrix xleftdiv (const Matrix& a, const Matrix& b, MatrixType &typ, |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
49 blas_trans_type transt = blas_no_trans); |
5785 | 50 extern ComplexMatrix xleftdiv (const Matrix& a, const ComplexMatrix& b, |
10313 | 51 MatrixType &typ, blas_trans_type transt = blas_no_trans); |
5785 | 52 extern ComplexMatrix xleftdiv (const ComplexMatrix& a, const Matrix& b, |
10313 | 53 MatrixType &typ, blas_trans_type transt = blas_no_trans); |
5785 | 54 extern ComplexMatrix xleftdiv (const ComplexMatrix& a, const ComplexMatrix& b, |
10313 | 55 MatrixType &typ, blas_trans_type transt = blas_no_trans); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
56 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
57 extern FloatMatrix xdiv (const FloatMatrix& a, const FloatMatrix& b, MatrixType &typ); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
58 extern FloatComplexMatrix xdiv (const FloatMatrix& a, const FloatComplexMatrix& b, |
10313 | 59 MatrixType &typ); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
60 extern FloatComplexMatrix xdiv (const FloatComplexMatrix& a, const FloatMatrix& b, |
10313 | 61 MatrixType &typ); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
62 extern FloatComplexMatrix xdiv (const FloatComplexMatrix& a, const FloatComplexMatrix& b, |
10313 | 63 MatrixType &typ); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
64 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
65 extern FloatMatrix x_el_div (float a, const FloatMatrix& b); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
66 extern FloatComplexMatrix x_el_div (float a, const FloatComplexMatrix& b); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
67 extern FloatComplexMatrix x_el_div (const FloatComplex a, const FloatMatrix& b); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
68 extern FloatComplexMatrix x_el_div (const FloatComplex a, const FloatComplexMatrix& b); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
69 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
70 extern FloatNDArray x_el_div (float a, const FloatNDArray& b); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
71 extern FloatComplexNDArray x_el_div (float a, const FloatComplexNDArray& b); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
72 extern FloatComplexNDArray x_el_div (const FloatComplex a, const FloatNDArray& b); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
73 extern FloatComplexNDArray x_el_div (const FloatComplex a, const FloatComplexNDArray& b); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
74 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
75 extern FloatMatrix xleftdiv (const FloatMatrix& a, const FloatMatrix& b, MatrixType &typ, |
9661
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
76 blas_trans_type transt = blas_no_trans); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
77 extern FloatComplexMatrix xleftdiv (const FloatMatrix& a, const FloatComplexMatrix& b, |
10313 | 78 MatrixType &typ, blas_trans_type transt = blas_no_trans); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
79 extern FloatComplexMatrix xleftdiv (const FloatComplexMatrix& a, const FloatMatrix& b, |
10313 | 80 MatrixType &typ, blas_trans_type transt = blas_no_trans); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
81 extern FloatComplexMatrix xleftdiv (const FloatComplexMatrix& a, const FloatComplexMatrix& b, |
10313 | 82 MatrixType &typ, blas_trans_type transt = blas_no_trans); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
83 |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
84 |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
85 extern Matrix xdiv (const Matrix& a, const DiagMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
86 extern ComplexMatrix xdiv (const ComplexMatrix& a, const DiagMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
87 extern ComplexMatrix xdiv (const ComplexMatrix& a, const ComplexDiagMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
88 |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
89 extern DiagMatrix xdiv (const DiagMatrix& a, const DiagMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
90 extern ComplexDiagMatrix xdiv (const ComplexDiagMatrix& a, const DiagMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
91 extern ComplexDiagMatrix xdiv (const ComplexDiagMatrix& a, const ComplexDiagMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
92 |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
93 extern FloatMatrix xdiv (const FloatMatrix& a, const FloatDiagMatrix& b); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
94 extern FloatComplexMatrix xdiv (const FloatComplexMatrix& a, |
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
95 const FloatDiagMatrix& b); |
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
96 extern FloatComplexMatrix xdiv (const FloatMatrix& a, |
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
97 const FloatComplexDiagMatrix& b); |
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
98 extern FloatComplexMatrix xdiv (const FloatComplexMatrix& a, |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
99 const FloatComplexDiagMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
100 |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
101 extern FloatDiagMatrix xdiv (const FloatDiagMatrix& a, const FloatDiagMatrix& b); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
102 extern FloatComplexDiagMatrix xdiv (const FloatComplexDiagMatrix& a, |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
103 const FloatDiagMatrix& b); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
104 extern FloatComplexDiagMatrix xdiv (const FloatComplexDiagMatrix& a, |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
105 const FloatComplexDiagMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
106 |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
107 extern Matrix xleftdiv (const DiagMatrix& a, const Matrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
108 extern ComplexMatrix xleftdiv (const DiagMatrix& a, const ComplexMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
109 extern ComplexMatrix xleftdiv (const ComplexDiagMatrix& a, const ComplexMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
110 |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
111 extern DiagMatrix xleftdiv (const DiagMatrix& a, const DiagMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
112 extern ComplexDiagMatrix xleftdiv (const DiagMatrix& a, const ComplexDiagMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
113 extern ComplexDiagMatrix xleftdiv (const ComplexDiagMatrix& a, const ComplexDiagMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
114 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
115 extern FloatMatrix xleftdiv (const FloatDiagMatrix& a, |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
116 const FloatMatrix& b); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
117 extern FloatComplexMatrix xleftdiv (const FloatDiagMatrix& a, |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
118 const FloatComplexMatrix& b); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
119 extern FloatComplexMatrix xleftdiv (const FloatComplexDiagMatrix& a, |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
120 const FloatComplexMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
121 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
122 extern FloatDiagMatrix xleftdiv (const FloatDiagMatrix& a, |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
123 const FloatDiagMatrix& b); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
124 extern FloatComplexDiagMatrix xleftdiv (const FloatDiagMatrix& a, |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
125 const FloatComplexDiagMatrix& b); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
126 extern FloatComplexDiagMatrix xleftdiv (const FloatComplexDiagMatrix& a, |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
127 const FloatComplexDiagMatrix& b); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
128 |
1 | 129 #endif |