Add support for plot legends - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/utils.h
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年01月11日 16:41:22 +0100
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年01月30日 21:26:02 +0100
commit3835be08da347dcaf854d61dc21f0cb52164ef8a (patch)
treec2a6772c5dc17fbfb551fbdb36e4d4617a82dd31 /agg-plot/utils.h
parent900c2a906c1a7ec8043b3f6eb9e74ec1c8f05063 (diff)
downloadgsl-shell-3835be08da347dcaf854d61dc21f0cb52164ef8a.tar.gz
Add support for plot legends
Introduce also the textshape graphical object required to create legends effectively.
Diffstat (limited to 'agg-plot/utils.h')
-rw-r--r--agg-plot/utils.h 6
1 files changed, 6 insertions, 0 deletions
diff --git a/agg-plot/utils.h b/agg-plot/utils.h
index d90febf6..a6a0a5df 100644
--- a/agg-plot/utils.h
+++ b/agg-plot/utils.h
@@ -48,6 +48,12 @@ private:
agg::pod_bvector<T*> m_list;
};
+inline bool is_unit_matrix(const agg::trans_affine& m, double eps = 1.0e-5)
+{
+ return (fabs(m.sx - 1.0) < eps && fabs(m.shx) < eps && \
+ fabs(m.shy) < eps && fabs(m.sy - 1.0) < eps);
+}
+
extern void trans_affine_compose (agg::trans_affine& a,
const agg::trans_affine& b);
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月14日 20:49:38 +0000

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