From f72fc9b3979e1dc0ae04b1bf7cdce74763aa3fdf Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Thu, 3 Jun 2010 12:35:11 +0000 Subject: [PATCH] + move transformation matrix to the parent class --- include/mapnik/point_symbolizer.hpp | 8 +------ src/point_symbolizer.cpp | 35 +++-------------------------- 2 files changed, 4 insertions(+), 39 deletions(-) diff --git a/include/mapnik/point_symbolizer.hpp b/include/mapnik/point_symbolizer.hpp index fdb25beef..f0dd0d35a 100644 --- a/include/mapnik/point_symbolizer.hpp +++ b/include/mapnik/point_symbolizer.hpp @@ -26,14 +26,10 @@ // mapnik #include -// boost -#include namespace mapnik { -typedef boost::array transform_type; - struct MAPNIK_DECL point_symbolizer : public symbolizer_with_image { @@ -44,12 +40,10 @@ struct MAPNIK_DECL point_symbolizer : bool get_allow_overlap() const; void set_opacity(float opacity); float get_opacity() const; - void set_transform(transform_type const& ); - transform_type const& get_transform() const; + private: float opacity_; bool overlap_; - transform_type matrix_; }; } diff --git a/src/point_symbolizer.cpp b/src/point_symbolizer.cpp index 489a4c471..71db30532 100644 --- a/src/point_symbolizer.cpp +++ b/src/point_symbolizer.cpp @@ -35,35 +35,17 @@ namespace mapnik point_symbolizer::point_symbolizer() : symbolizer_with_image(path_expression_ptr(new path_expression)), // FIXME opacity_(1.0), - overlap_(false) -{ - matrix_[0] = 1.0; - matrix_[1] = 0.0; - matrix_[2] = 0.0; - matrix_[3] = 1.0; - matrix_[4] = 0.0; - matrix_[5] = 0.0; -} + overlap_(false) {} point_symbolizer::point_symbolizer(path_expression_ptr file) : symbolizer_with_image(file), opacity_(1.0), - overlap_(false) - -{ - matrix_[0] = 1.0; - matrix_[1] = 0.0; - matrix_[2] = 0.0; - matrix_[3] = 1.0; - matrix_[4] = 0.0; - matrix_[5] = 0.0; -} + overlap_(false) {} point_symbolizer::point_symbolizer(point_symbolizer const& rhs) : symbolizer_with_image(rhs), opacity_(rhs.opacity_), - overlap_(rhs.overlap_), - matrix_(rhs.matrix_) + overlap_(rhs.overlap_) {} void point_symbolizer::set_allow_overlap(bool overlap) @@ -86,16 +68,5 @@ float point_symbolizer::get_opacity() const return opacity_; } -void point_symbolizer::set_transform(transform_type const& matrix) -{ - matrix_ = matrix; -} - -transform_type const& point_symbolizer::get_transform() const -{ - return matrix_; -} - - }