summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hughes <tom@compton.nu>2008-02-16 15:52:42 +0000
committerJonathon Jongsma <jjongsma@gnome.org>2008-02-17 21:11:33 -0600
commitc2e54447cf285684d90a88c100324ef9af8a703c (patch)
tree754891e77efb136bd93d06b576a82c7c440f80f9
parent259af6cb264770d2aa8e27d2c73df2ad4500cdd5 (diff)
Revert get_current_point as cairo_get_current_point has been reverted to it's previous interface. Also change new has_current_point method to call the new cairo_has_current_point routine.
-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);
}