From 5b9eef6fae3e398ee08a2c77d2230f4110ac7ac4 Mon Sep 17 00:00:00 2001 From: Jonathon Jongsma Date: Mon, 8 Jun 2009 21:53:28 -0500 Subject: [PATCH] Revert "Fix broken Pattern::get/set_matrix() API that was using the C types" This reverts commit bbf5159397aac3f952d0c17a5e66e7fc40177b8b. Conflicts: ChangeLog cairomm/pattern.h --- cairomm/pattern.cc | 17 ++++------------- cairomm/pattern.h | 9 ++------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/cairomm/pattern.cc b/cairomm/pattern.cc index 8e49331..420ed82 100644 --- a/cairomm/pattern.cc +++ b/cairomm/pattern.cc @@ -18,7 +18,6 @@ #include #include -#include namespace Cairo { @@ -53,26 +52,18 @@ void Pattern::unreference() const cairo_pattern_destroy(m_cobject); } -void Pattern::set_matrix(const Matrix& matrix) +void Pattern::set_matrix(const cairo_matrix_t &matrix) { - cairo_pattern_set_matrix(m_cobject, (cairo_matrix_t*)&matrix); + cairo_pattern_set_matrix(m_cobject, &matrix); check_object_status_and_throw_exception(*this); } -void Pattern::get_matrix(Matrix& matrix) const +void Pattern::get_matrix(cairo_matrix_t &matrix) const { - cairo_pattern_get_matrix(m_cobject, (cairo_matrix_t*)&matrix); + cairo_pattern_get_matrix(m_cobject, &matrix); check_object_status_and_throw_exception(*this); } -Matrix Pattern::get_matrix() const -{ - Cairo::Matrix m; - cairo_pattern_get_matrix(m_cobject, (cairo_matrix_t*)&m); - check_object_status_and_throw_exception(*this); - return m; -} - PatternType Pattern::get_type() const { cairo_pattern_type_t pattern_type = cairo_pattern_get_type(m_cobject); diff --git a/cairomm/pattern.h b/cairomm/pattern.h index d5e4872..e56d383 100644 --- a/cairomm/pattern.h +++ b/cairomm/pattern.h @@ -32,8 +32,6 @@ struct ColorStop double red, green, blue, alpha; }; -class Matrix; - /** * This is a reference-counted object that should be used via Cairo::RefPtr. */ @@ -54,11 +52,8 @@ public: virtual ~Pattern(); - void set_matrix(const Matrix& matrix); - void get_matrix(Matrix& matrix) const; - /** @since 1.8 - */ - Matrix get_matrix() const; + void set_matrix(const cairo_matrix_t &matrix); + void get_matrix(cairo_matrix_t &matrix) const; PatternType get_type() const; typedef cairo_pattern_t cobject; -- 1.6.3.1