31 extern "C" void dr_init(
int screen_x_max,
int screen_y_max,
double xmin,
double ymin,
double xmax,
double ymax);
33 extern "C" void dr_line(
double x1,
double y1,
double x2,
double y2,
const char *color);
34 extern "C" void dr_marker(
double x,
double y,
int type,
const char *color);
35 extern "C" void dr_text(
double x,
double y,
int hz_al,
int vr_al,
const char *text,
const char* color);
36 extern "C" void dr_text_pix(
int px,
int py,
const char *text,
const char* color);
37 extern "C" void dr_scale(
double xmin,
double ymin,
double xmax,
double ymax);
40 extern "C" void dr_circle(
double x,
double y,
double r,
const char *color);
41 extern "C" void dr_cov_ellipse(
double x,
double y,
double c11,
double c12,
double c22,
const char *color);
43 extern "C" void dr_fit(
void);
44 extern "C" void dr_save(
const char *filename);
void dr_replot(void)
Redraw the screen content.
Definition: draw.c:646
void dr_text_pix(int px, int py, const char *text, const char *color)
Temporary code to output text to screen coordinates.
Definition: draw.c:633
void dr_line(double x1, double y1, double x2, double y2, const char *color)
Plot a line between [x1,y1] and [x2,y2] using color.
Definition: draw.c:437
void dr_equal(int equal)
Enable or disable equal drawing unit per pixel ratio for both axis.
Definition: draw.c:897
void dr_circle(double x, double y, double r, const char *color)
Plot a circle of radius r at [x,y] using color.
Definition: draw.c:468
int dr_COLORS_CNT
Definition: draw.h:29
char * dr_COLORS[]
Definition: draw.h:28
void dr_text(double x, double y, int hz_al, int vr_al, const char *text, const char *color)
Place a text to (x,y).
Definition: draw.c:602
void dr_save(const char *filename)
Save the screen into a PNG image (needs extra packages).
Definition: draw.c:883
void dr_init(int screen_x_max, int screen_y_max, double xmin, double ymin, double xmax, double ymax)
Initialize the drawing module.
Definition: draw.c:321
void dr_fit(void)
Scale all drawn objects to fit the screen.
Definition: draw.c:804
void dr_erase(void)
Clear the screen and erase the drawn objects from memory.
Definition: draw.c:682
void dr_close(void)
Close the drawing window.
Definition: draw.c:351
void dr_marker(double x, double y, int type, const char *color)
Place a marker to (x,y). Possible markers are: DR_MARKER_CIRCLE, DR_MARKER_TRIANGLE, DR_MARKER_CROSS.
Definition: draw.c:572
void dr_cov_ellipse(double x, double y, double c11, double c12, double c22, const char *color)
Plot a covariance ellipse to depict uncertainty.
Definition: draw.c:504
void dr_zoom(void)
Interactive zooming until enter, space or 'q' is pressed.
Definition: draw.c:702
void dr_print_database(void)
Debug function to print buffer.
Definition: draw.c:906
void dr_scale(double xmin, double ymin, double xmax, double ymax)
Scale the shown area. Prior rescaling, the area is normalized to keep the aspect ratio.
Definition: draw.c:672