summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cairomm/context.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/cairomm/context.cc b/cairomm/context.cc
index 48e193e..706e1e8 100644
--- a/cairomm/context.cc
+++ b/cairomm/context.cc
@@ -594,19 +594,12 @@ Antialias Context::get_antialias() const
bool Context::has_current_point() const
{
- double x, y;
- cairo_status_t status = cairo_get_current_point(m_cobject, &x, &y);
- return (status != CAIRO_STATUS_NO_CURRENT_POINT);
+ return cairo_has_current_point(m_cobject);
}
void Context::get_current_point(double& x, double& y) const
{
- // NOTE: this function used to return void, but was changed to return a status
- // if there was no current point. We would normally check the status and
- // throw an exception on error, but this could break existing code, so we
- // added a has_current_point() function to be able to determine the case where
- // there is no current point.
- (void) cairo_get_current_point(m_cobject, &x, &y);
+ cairo_get_current_point(m_cobject, &x, &y);
check_object_status_and_throw_exception(*this);
}