26 #if ! defined (octave_text_renderer_h)
27 #define octave_text_renderer_h 1
29 #include "octave-config.h"
64 Matrix get_extent (
const std::string& txt,
double rotation = 0.0,
67 void set_anti_aliasing (
bool val);
69 void set_font (
const std::string& name,
const std::string& weight,
70 const std::string& angle,
double size);
74 void set_color (
const Matrix& c);
76 void text_to_pixels (
const std::string& txt,
78 int halign,
int valign,
double rotation = 0.0,
80 bool handle_rotation =
true);
87 : m_name (), m_weight (), m_angle (), m_size (0)
90 font (
const std::string& nm,
const std::string& wt,
91 const std::string& ang,
double sz)
92 : m_name (nm), m_weight (wt), m_angle (ang), m_size (sz)
96 : m_name (ft.m_name), m_weight (ft.m_weight), m_angle (ft.m_angle),
115 std::string
get_name (
void)
const {
return m_name; }
138 : m_str (s), m_family (
f.get_name ()), m_fnt (
f), m_x (
x), m_y (y),
139 m_z (0.0), m_xdata (), m_code (0), m_color (
Matrix (1, 3, 0.0)),
144 : m_str (s.m_str), m_family (s.m_family), m_fnt (s.m_fnt), m_x (s.m_x),
145 m_y (s.m_y), m_z (s.m_z), m_xdata (s.m_xdata), m_code (s.m_code),
146 m_color (s.m_color), m_svg_element (s.m_svg_element)
151 string& operator = (
const string& s)
173 std::string
get_name (
void)
const {
return m_fnt.get_name (); }
179 std::string
get_weight (
void)
const {
return m_fnt.get_weight (); }
181 std::string
get_angle (
void)
const {
return m_fnt.get_angle (); }
183 double get_size (
void)
const {
return m_fnt.get_size (); }
187 double get_x (
void)
const {
return m_x; }
191 std::vector<double>
get_xdata (
void)
const {
return m_xdata; }
193 void set_y (
const double y) { m_y = y; }
195 double get_y (
void)
const {
return m_y; }
197 void set_z (
const double z) { m_z = z; }
199 double get_z (
void)
const {
return m_z; }
201 void set_code (
const uint32_t code) { m_code = code; }
211 m_color(0) =
static_cast<double> (c(0)) / 255;
212 m_color(1) =
static_cast<double> (c(1)) / 255;
213 m_color(2) =
static_cast<double> (c(2)) / 255;
230 void text_to_strlist (
const std::string& txt,
232 int halign,
int valign,
double rotation = 0.0,
font(const std::string &nm, const std::string &wt, const std::string &ang, double sz)
std::string get_angle(void) const
std::string get_name(void) const
double get_size(void) const
std::string get_weight(void) const
std::string get_weight(void) const
Matrix get_color(void) const
void set_z(const double z)
std::string get_svg_element(void) const
std::vector< double > m_xdata
std::string get_name(void) const
string(const std::string &s, font &f, const double x, const double y)
void set_string(const std::string &s)
void set_svg_element(const std::string &svg)
void set_xdata(const std::vector< double > &x)
void set_y(const double y)
std::string get_family(void) const
std::string get_string(void) const
std::string m_svg_element
std::vector< double > get_xdata(void) const
void set_x(const double x)
void set_family(const std::string &nm)
double get_size(void) const
std::string get_angle(void) const
uint32_t get_code(void) const
void set_code(const uint32_t code)
void set_color(const uint8NDArray &c)
base_text_renderer * m_latex_rep
base_text_renderer * m_rep
text_renderer(const text_renderer &)=delete
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
F77_RET_T const F77_DBLE * x
F77_RET_T const F77_DBLE const F77_DBLE * f
static octave_value box(JNIEnv *jni_env, void *jobj, void *jcls_arg=nullptr)