Simplify plot methods to manage the plot labels - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/plot.h
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年01月04日 14:40:49 +0100
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年01月04日 14:40:49 +0100
commit99b16872c85c2a090f334820d96f95f145d8db74 (patch)
tree12eab13fff805de8abcc3e06d5efb1e7dbc23395 /agg-plot/plot.h
parent046c56f449db15b9c9aa113cb03adf695dd7b9b6 (diff)
downloadgsl-shell-99b16872c85c2a090f334820d96f95f145d8db74.tar.gz
Simplify plot methods to manage the plot labels
Diffstat (limited to 'agg-plot/plot.h')
-rw-r--r--agg-plot/plot.h 17
1 files changed, 3 insertions, 14 deletions
diff --git a/agg-plot/plot.h b/agg-plot/plot.h
index 171aabad..e703ab30 100644
--- a/agg-plot/plot.h
+++ b/agg-plot/plot.h
@@ -119,14 +119,9 @@ public:
}
};
- void set_title(const char *text);
- const char *title() const { return m_title.cstr(); };
-
- void set_xlabel(const char *text) { str_copy_c(&m_xlabel, text); }
- const char *xlabel() const { return m_xlabel.cstr(); };
-
- void set_ylabel(const char *text) { str_copy_c(&m_ylabel, text); }
- const char *ylabel() const { return m_ylabel.cstr(); };
+ str& title() { return m_title; }
+ str& x_axis_title() { return m_xlabel; }
+ str& y_axis_title() { return m_ylabel; }
void set_units(bool use_units);
bool use_units() const { return m_use_units; };
@@ -250,12 +245,6 @@ void plot<VS,RM>::add(VS* vs, agg::rgba8& color, bool outline)
}
template <class VS, class RM>
-void plot<VS,RM>::set_title(const char *text)
-{
- str_copy_c(&m_title, text);
-}
-
-template <class VS, class RM>
void plot<VS,RM>::push_drawing_queue()
{
for (pod_list<item> *c = m_drawing_queue; c != 0; c = c->next())
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月13日 19:03:15 +0000

AltStyle によって変換されたページ (->オリジナル) /