Public Types | |
enum | { ROTATION_0 = 0 , ROTATION_90 = 1 , ROTATION_180 = 2 , ROTATION_270 = 3 } |
Public Member Functions | |
latex_renderer (void) | |
~latex_renderer (void) | |
void | fix_bbox_anchor (Matrix &bbox, int halign, int valign, int rot_mode, bool handle_rotation) const |
Matrix | get_extent (const std::string &txt, double rotation, const caseless_str &interpreter) |
Matrix | get_extent (text_element *, double) |
octave_map | get_system_fonts (void) |
bool | ok (void) |
virtual void | reset (void) |
void | rotate_pixels (uint8NDArray &pixels, int rot_mode) const |
int | rotation_to_mode (double rotation) const |
void | set_anti_aliasing (bool) |
void | set_color (const Matrix &c) |
void | set_font (const std::string &, const std::string &, const std::string &, double size) |
void | text_to_pixels (const std::string &txt, uint8NDArray &pxls, Matrix &bbox, int halign, int valign, double rotation, const caseless_str &interpreter, bool handle_rotation) |
void | text_to_strlist (const std::string &txt, std::list< text_renderer::string > &lst, Matrix &bbox, int halign, int valign, double rotation, const caseless_str &interp) |
virtual void | visit (text_element_color &) |
virtual void | visit (text_element_combined &) |
virtual void | visit (text_element_fontname &) |
virtual void | visit (text_element_fontsize &) |
virtual void | visit (text_element_fontstyle &) |
virtual void | visit (text_element_list &e) |
virtual void | visit (text_element_string &) |
virtual void | visit (text_element_subscript &e) |
virtual void | visit (text_element_superscript &e) |
virtual void | visit (text_element_symbol &) |
Private Member Functions | |
std::string | key (const std::string &txt, int halign) |
bool | read_image (const std::string &png_file, uint8NDArray &data) const |
uint8NDArray | render (const std::string &txt, int halign=0) |
void | warn_helper (std::string caller, std::string txt, std::string cmd, process_execution_result result) |
std::string | write_tex_file (const std::string &txt, int halign) |
Private Attributes | |
uint8NDArray | m_color |
bool | m_debug |
std::string | m_dvipng_binary |
std::string | m_dvisvg_binary |
std::string | m_fontname |
double | m_fontsize |
std::string | m_latex_binary |
bool | m_testing |
std::string | m_tmp_dir |
Definition at line 52 of file latex-text-renderer.cc.
|
inherited |
Enumerator | |
---|---|
ROTATION_0 | |
ROTATION_90 | |
ROTATION_180 | |
ROTATION_270 |
Definition at line 48 of file base-text-renderer.h.
|
inline |
Definition at line 59 of file latex-text-renderer.cc.
References quote_string().
|
inline |
Definition at line 80 of file latex-text-renderer.cc.
References recursive_rmdir().
|
inherited |
Definition at line 109 of file base-text-renderer.cc.
References base_text_renderer::ROTATION_180, base_text_renderer::ROTATION_270, and base_text_renderer::ROTATION_90.
Referenced by ft_text_renderer::text_to_pixels(), and text_to_pixels().
|
inlinevirtual |
Implements base_text_renderer.
Definition at line 107 of file latex-text-renderer.cc.
References Matrix::extract_n().
|
inlinevirtual |
Implements base_text_renderer.
Definition at line 102 of file latex-text-renderer.cc.
References Matrix.
|
inlinevirtual |
Implements base_text_renderer.
Definition at line 147 of file latex-text-renderer.cc.
|
inlineprivate |
Definition at line 153 of file latex-text-renderer.cc.
Referenced by render().
|
virtual |
Reimplemented from base_text_renderer.
Definition at line 186 of file latex-text-renderer.cc.
References Array< T, Alloc >::isempty(), m_testing, render(), and warning_with_id().
Referenced by text_to_pixels().
|
private |
Definition at line 290 of file latex-text-renderer.cc.
References __get_interpreter__(), F__magick_ping__(), F__magick_read__(), octave_scalar_map::getfield(), octave_value::int_value(), m_color, ovl(), interpreter::recover_from_exception(), octave_scalar_map::setfield(), and warning_with_id().
Referenced by render().
|
private |
Definition at line 371 of file latex-text-renderer.cc.
References __get_gh_manager__(), process_execution_result::exit_status(), floor(), ifstream(), key(), m_debug, m_dvipng_binary, m_dvisvg_binary, m_fontsize, m_latex_binary, m_tmp_dir, quote_string(), read_image(), run_command_and_return_output(), warn_helper(), and write_tex_file().
Referenced by ok(), and text_to_pixels().
|
inlinevirtualinherited |
Reimplemented in ft_text_renderer.
Definition at line 363 of file text-engine.h.
|
inherited |
Definition at line 35 of file base-text-renderer.cc.
References Array< T, Alloc >::dim2(), Array< T, Alloc >::dim3(), Array< T, Alloc >::index(), MArray< T >::permute(), base_text_renderer::ROTATION_0, base_text_renderer::ROTATION_180, base_text_renderer::ROTATION_270, and base_text_renderer::ROTATION_90.
Referenced by ft_text_renderer::render(), and text_to_pixels().
|
inherited |
Definition at line 88 of file base-text-renderer.cc.
References base_text_renderer::ROTATION_0, base_text_renderer::ROTATION_180, base_text_renderer::ROTATION_270, and base_text_renderer::ROTATION_90.
Referenced by ft_text_renderer::get_extent(), ft_text_renderer::text_to_pixels(), and text_to_pixels().
|
inlinevirtual |
Implements base_text_renderer.
Definition at line 145 of file latex-text-renderer.cc.
|
inlinevirtual |
Implements base_text_renderer.
Definition at line 92 of file latex-text-renderer.cc.
References Array< T, Alloc >::numel().
|
inlinevirtual |
Implements base_text_renderer.
Definition at line 86 of file latex-text-renderer.cc.
|
virtual |
Implements base_text_renderer.
Definition at line 487 of file latex-text-renderer.cc.
References Array< T, Alloc >::dim2(), Array< T, Alloc >::dim3(), base_text_renderer::fix_bbox_anchor(), Array< T, Alloc >::isempty(), Matrix, Array< T, Alloc >::ndims(), ok(), render(), base_text_renderer::rotate_pixels(), and base_text_renderer::rotation_to_mode().
|
inlinevirtual |
Implements base_text_renderer.
Definition at line 118 of file latex-text-renderer.cc.
References __get_gh_manager__(), text_renderer::string::set_color(), and text_renderer::string::set_svg_element().
|
inlinevirtualinherited |
Reimplemented in ft_text_renderer.
Definition at line 361 of file text-engine.h.
|
inlinevirtualinherited |
Reimplemented in ft_text_renderer.
Definition at line 353 of file text-engine.h.
|
inlinevirtualinherited |
Reimplemented in ft_text_renderer.
Definition at line 357 of file text-engine.h.
|
inlinevirtualinherited |
Reimplemented in ft_text_renderer.
Definition at line 359 of file text-engine.h.
|
inlinevirtualinherited |
Reimplemented in ft_text_renderer.
Definition at line 355 of file text-engine.h.
|
inlinevirtualinherited |
Reimplemented in ft_text_renderer.
Definition at line 339 of file text-engine.h.
|
inlinevirtualinherited |
Reimplemented in ft_text_renderer.
Definition at line 335 of file text-engine.h.
Referenced by ft_text_renderer::visit().
|
inlinevirtualinherited |
Reimplemented in ft_text_renderer.
Definition at line 347 of file text-engine.h.
References text_element::accept(), and text_element_subscript::get_element().
|
inlinevirtualinherited |
Reimplemented in ft_text_renderer.
Definition at line 350 of file text-engine.h.
References text_element::accept(), and text_element_superscript::get_element().
|
inlinevirtualinherited |
Reimplemented in ft_text_renderer.
Definition at line 337 of file text-engine.h.
|
private |
Definition at line 351 of file latex-text-renderer.cc.
References process_execution_result::err_msg(), m_debug, m_testing, process_execution_result::stdout_output(), and warning_with_id().
Referenced by render().
|
private |
Definition at line 213 of file latex-text-renderer.cc.
References canonicalize_file_name(), concat(), get_temp_directory(), m_tmp_dir, mkdir(), ofstream(), tempnam(), and warning_with_id().
Referenced by render().
|
private |
Definition at line 176 of file latex-text-renderer.cc.
Referenced by read_image().
|
private |
Definition at line 180 of file latex-text-renderer.cc.
Referenced by render(), and warn_helper().
|
private |
Definition at line 178 of file latex-text-renderer.cc.
Referenced by render().
|
private |
Definition at line 179 of file latex-text-renderer.cc.
Referenced by render().
|
private |
Definition at line 174 of file latex-text-renderer.cc.
|
private |
Definition at line 173 of file latex-text-renderer.cc.
Referenced by render().
|
private |
Definition at line 177 of file latex-text-renderer.cc.
Referenced by render().
|
private |
Definition at line 181 of file latex-text-renderer.cc.
Referenced by ok(), and warn_helper().
|
private |
Definition at line 175 of file latex-text-renderer.cc.
Referenced by render(), and write_tex_file().