summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2022-08-16 17:09:48 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2022-08-16 17:09:48 +0200
commit8d1ca61b0e6a8e4f4eff7225becb23f1836df2ff (patch)
tree2406b104d80fd5c9c10ef3feca5d6b949edffbe9
parent4998c316ab1af5abed696e04bcb62144c11698a3 (diff)
Fix build with -Dbuild-deprecated-api=false
Fixes #29
-rw-r--r--cairomm/context.cc14
-rw-r--r--cairomm/pattern.cc2
2 files changed, 12 insertions, 4 deletions
diff --git a/cairomm/context.cc b/cairomm/context.cc
index a4125ba..f7763b9 100644
--- a/cairomm/context.cc
+++ b/cairomm/context.cc
@@ -151,6 +151,7 @@ void Context::set_line_join(LineJoin line_join)
check_object_status_and_throw_exception(*this);
}
+#ifndef CAIROMM_DISABLE_DEPRECATED
void Context::set_dash(std::valarray<double>& dashes, double offset)
{
std::vector<double> v(dashes.size());
@@ -167,6 +168,7 @@ void Context::set_dash(std::vector<double>& dashes, double offset)
dashes.size(), offset);
check_object_status_and_throw_exception(*this);
}
+#endif //CAIROMM_DISABLE_DEPRECATED
void Context::set_dash(const std::valarray<double>& dashes, double offset)
{
@@ -251,12 +253,13 @@ void Context::set_identity_matrix()
check_object_status_and_throw_exception(*this);
}
-//deprecated:
+#ifndef CAIROMM_DISABLE_DEPRECATED
void Context::user_to_device(double& x, double& y)
{
const Context* constThis = this;
constThis->user_to_device(x, y);
}
+#endif //CAIROMM_DISABLE_DEPRECATED
void Context::user_to_device(double& x, double& y) const
{
@@ -264,12 +267,13 @@ void Context::user_to_device(double& x, double& y) const
check_object_status_and_throw_exception(*this);
}
-//deprecated:
+#ifndef CAIROMM_DISABLE_DEPRECATED
void Context::user_to_device_distance(double& dx, double& dy)
{
const Context* constThis = this;
constThis->user_to_device_distance(dx, dy);
}
+#endif //CAIROMM_DISABLE_DEPRECATED
void Context::user_to_device_distance(double& dx, double& dy) const
{
@@ -277,12 +281,13 @@ void Context::user_to_device_distance(double& dx, double& dy) const
check_object_status_and_throw_exception(*this);
}
-//deprecated:
+#ifndef CAIROMM_DISABLE_DEPRECATED
void Context::device_to_user(double& x, double& y)
{
const Context* constThis = this;
constThis->device_to_user(x, y);
}
+#endif //CAIROMM_DISABLE_DEPRECATED
void Context::device_to_user(double& x, double& y) const
{
@@ -290,12 +295,13 @@ void Context::device_to_user(double& x, double& y) const
check_object_status_and_throw_exception(*this);
}
-//deprecated:
+#ifndef CAIROMM_DISABLE_DEPRECATED
void Context::device_to_user_distance(double& dx, double& dy)
{
const Context* constThis = this;
constThis->device_to_user_distance(dx, dy);
}
+#endif //CAIROMM_DISABLE_DEPRECATED
void Context::device_to_user_distance(double& dx, double& dy) const
{
diff --git a/cairomm/pattern.cc b/cairomm/pattern.cc
index 9ce7a26..727bb65 100644
--- a/cairomm/pattern.cc
+++ b/cairomm/pattern.cc
@@ -173,6 +173,7 @@ SurfacePattern::~SurfacePattern()
{
}
+#ifndef CAIROMM_DISABLE_DEPRECATED
void SurfacePattern::set_extend(Extend extend)
{
Pattern::set_extend(extend);
@@ -182,6 +183,7 @@ Extend SurfacePattern::get_extend() const
{
return Pattern::get_extend();
}
+#endif //CAIROMM_DISABLE_DEPRECATED
void SurfacePattern::set_filter(Filter filter)
{