|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tree picture generation utilities. More...
#include <cstdio>#include <cmath>#include <cstdlib>#include <cstring>#include <iostream>#include <fstream>#include <aleph.H>Go to the source code of this file.
Functions | |
| long double | font_width () |
| long double | font_height () |
| void | intersection_ellipse_line (long double lx0, long double ly0, long double lx1, long double ly1, long double a, long double b, long double &dx, long double &dy) |
| void | intersection_line_line (long double lx1, long double ly1, long double lx2, long double ly2, long double rx1, long double ry1, long double rx2, long double ry2, long double &x, long double &y) |
| long double | distance_between_points (long double x1, long double y1, long double x2, long double y2) |
| void | intersection_rectangle_line (long double lx0, long double ly0, long double lx1, long double ly1, long double a, long double b, long double &dx, long double &dy) |
| long double | YPIC (long double y) |
| size_t | compute_true_len (const std::string &str) |
| void | put_string (std::ofstream &output, const long double &x, const long double &y, const std::string &comment, const std::string &str) |
| void | put_string_tkiz (std::ofstream &output, const long double &x, const long double &y, const std::string &comment, const std::string &str) |
| void | draw_arc (std::ofstream &output, long double src_x, long double src_y, long double tgt_x, long double tgt_y, bool is_dashed, bool with_arrow, bool thick=true) |
| void | draw_arc_tikz (std::ofstream &output, long double src_x, long double src_y, long double tgt_x, long double tgt_y, bool is_dashed, bool with_arrow, bool thick=true) |
| long double | center_string (const std::string &str, long double window_size) |
| long double | string_width (const std::string &str) |
| int | compute_section (long double x1, long double y1, long double x2, long double y2) |
| void | compute_mid_point_line (const long double &sx, const long double &sy, const long double &tx, const long double &ty, const long double &d, const bool &left, long double &mx, long double &my) |
Variables | |
| const long double | sin_45 = sin(M_PI_4) |
| const long double | cos_45 = cos(M_PI_4) |
| const char *const | font_wrapper = "\\texttt{" |
| const char * | fill_type = "shade" |
| static const long double | points_per_inch = 72.27 |
| static const long double | mm_per_inch = 25.4 |
| long double | font_width_in_points = 5 |
| long double | font_width_in_mm |
| long double | font_height_in_mm = 2.0 |
| long double | resolution = 0.05 |
| bool | flip_y = false |
| bool | tiny_keys = false |
| Global flag to enable tiny font size for keys/labels. | |
| std::string | input_file_name |
| std::string | output_file_name |
| double | v_size |
| bool | with_arrow = false |
| long double | dash_len = 1/resolution |
| long double | arrow_width = arrow_width_in_mm/resolution |
| long double | arrow_lenght = arrow_lenght_in_mm/resolution |
Arrow drawing parameters (in mm) | |
| |
| static long double | arrow_width_in_mm = 0.5 |
| static long double | arrow_lenght_in_mm = 1.5 |
Tree picture generation utilities.
Definition in file treepic_utils.H.
|
inline |
Definition at line 419 of file treepic_utils.H.
References compute_true_len(), and font_width().
Referenced by generate_tree(), and generate_tree().
|
inline |
Definition at line 450 of file treepic_utils.H.
References h.
|
inline |
Definition at line 432 of file treepic_utils.H.
References y1().
|
inline |
Definition at line 255 of file treepic_utils.H.
Referenced by center_string(), and string_width().
|
inline |
Definition at line 185 of file treepic_utils.H.
|
inline |
Definition at line 328 of file treepic_utils.H.
References arrow_lenght, arrow_width, atan(), atan2(), cos(), dash_len, l, output, sin(), sqrt(), with_arrow, and YPIC().
Referenced by generate_tree(), and generate_tree().
|
inline |
Definition at line 372 of file treepic_utils.H.
References arrow_lenght, arrow_width, atan(), atan2(), cos(), l, output, sin(), sqrt(), with_arrow, and YPIC().
|
inline |
Definition at line 106 of file treepic_utils.H.
References font_height_in_mm, and resolution.
Referenced by generate_split_lines(), generate_tree(), generate_tree(), put_string(), and put_string_tkiz().
|
inline |
Definition at line 100 of file treepic_utils.H.
References font_width_in_mm, and resolution.
Referenced by center_string(), and string_width().
|
inline |
Definition at line 124 of file treepic_utils.H.
References sqrt().
Referenced by generate_tree(), and generate_tree().
|
inline |
Definition at line 162 of file treepic_utils.H.
References y.
|
inline |
Definition at line 207 of file treepic_utils.H.
Referenced by generate_tree().
|
inline |
Definition at line 281 of file treepic_utils.H.
References flip_y, font_height(), font_wrapper, output, tiny_keys, y, and YPIC().
Referenced by generate_tree(), and generate_tree().
|
inline |
Definition at line 301 of file treepic_utils.H.
References flip_y, font_height(), output, y, and YPIC().
|
inline |
Definition at line 426 of file treepic_utils.H.
References compute_true_len(), and font_width().
Referenced by generate_tree(), and generate_tree().
|
inline |
Definition at line 249 of file treepic_utils.H.
References flip_y, v_size, and y.
Referenced by draw_arc(), draw_arc_tikz(), generate_curve(), generate_split_lines(), generate_tree(), generate_tree(), put_string(), and put_string_tkiz().
| long double arrow_lenght = arrow_lenght_in_mm/resolution |
Definition at line 326 of file treepic_utils.H.
Referenced by draw_arc(), draw_arc_tikz(), main(), and parser_opt().
|
static |
Definition at line 321 of file treepic_utils.H.
| long double arrow_width = arrow_width_in_mm/resolution |
Definition at line 325 of file treepic_utils.H.
Referenced by draw_arc(), draw_arc_tikz(), main(), and parser_opt().
|
static |
Definition at line 320 of file treepic_utils.H.
| const long double cos_45 = cos(M_PI_4) |
Definition at line 58 of file treepic_utils.H.
| long double dash_len = 1/resolution |
Definition at line 324 of file treepic_utils.H.
Referenced by draw_arc(), generate_split_lines(), and generate_tree().
| const char * fill_type = "shade" |
Definition at line 61 of file treepic_utils.H.
Referenced by build_tree(), generate_prologue(), main(), and parser_opt().
| bool flip_y = false |
Definition at line 74 of file treepic_utils.H.
Referenced by main(), parser_opt(), put_string(), put_string_tkiz(), and YPIC().
| long double font_height_in_mm = 2.0 |
Definition at line 70 of file treepic_utils.H.
Referenced by font_height().
| long double font_width_in_mm |
| long double font_width_in_points = 5 |
Definition at line 66 of file treepic_utils.H.
| const char *const font_wrapper = "\\texttt{" |
Definition at line 60 of file treepic_utils.H.
Referenced by generate_split_lines(), and put_string().
|
extern |
Definition at line 406 of file btreepic.C.
Referenced by file_to_dynarrays(), generate_prologue(), main(), and parser_opt().
|
static |
Definition at line 64 of file treepic_utils.H.
|
extern |
Definition at line 407 of file btreepic.C.
Referenced by generate_prologue(), main(), and parser_opt().
|
static |
Definition at line 63 of file treepic_utils.H.
| long double resolution = 0.05 |
Definition at line 72 of file treepic_utils.H.
Referenced by adjust_size_by_tags(), compute_picture_size(), font_height(), font_width(), generate_prologue(), generate_split_lines(), generate_tree(), generate_tree(), main(), parser_opt(), print_parameters(), read_parameters(), and save_parameters().
| const long double sin_45 = sin(M_PI_4) |
Definition at line 57 of file treepic_utils.H.
Referenced by generate_tree(), and generate_tree().
| bool tiny_keys = false |
Global flag to enable tiny font size for keys/labels.
When set to true, text labels will be rendered using LaTeX's \tiny font size modifier. Useful for dense diagrams with many labels.
Definition at line 76 of file treepic_utils.H.
Referenced by Eepic_Plane::draw_text(), main(), and put_string().
|
extern |
Definition at line 156 of file btreepic.C.
Referenced by adjust_size_by_tags(), compute_coordinates_for_forest_and_set_picture_size(), compute_picture_size(), generate_picture(), generate_prologue(), generate_split_lines(), main(), print_parameters(), read_parameters(), save_parameters(), set_picture_size(), and YPIC().
| bool with_arrow = false |
Definition at line 323 of file treepic_utils.H.
Referenced by draw_arc(), draw_arc_tikz(), generate_tree(), generate_tree(), main(), and parser_opt().