+ move transformation matrix to the parent class
This commit is contained in:
parent
b6414778d6
commit
f72fc9b397
2 changed files with 4 additions and 39 deletions
|
@ -26,14 +26,10 @@
|
||||||
|
|
||||||
// mapnik
|
// mapnik
|
||||||
#include <mapnik/symbolizer.hpp>
|
#include <mapnik/symbolizer.hpp>
|
||||||
// boost
|
|
||||||
#include <boost/array.hpp>
|
|
||||||
|
|
||||||
namespace mapnik
|
namespace mapnik
|
||||||
{
|
{
|
||||||
|
|
||||||
typedef boost::array<double,6> transform_type;
|
|
||||||
|
|
||||||
struct MAPNIK_DECL point_symbolizer :
|
struct MAPNIK_DECL point_symbolizer :
|
||||||
public symbolizer_with_image
|
public symbolizer_with_image
|
||||||
{
|
{
|
||||||
|
@ -44,12 +40,10 @@ struct MAPNIK_DECL point_symbolizer :
|
||||||
bool get_allow_overlap() const;
|
bool get_allow_overlap() const;
|
||||||
void set_opacity(float opacity);
|
void set_opacity(float opacity);
|
||||||
float get_opacity() const;
|
float get_opacity() const;
|
||||||
void set_transform(transform_type const& );
|
|
||||||
transform_type const& get_transform() const;
|
|
||||||
private:
|
private:
|
||||||
float opacity_;
|
float opacity_;
|
||||||
bool overlap_;
|
bool overlap_;
|
||||||
transform_type matrix_;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,35 +35,17 @@ namespace mapnik
|
||||||
point_symbolizer::point_symbolizer()
|
point_symbolizer::point_symbolizer()
|
||||||
: symbolizer_with_image(path_expression_ptr(new path_expression)), // FIXME
|
: symbolizer_with_image(path_expression_ptr(new path_expression)), // FIXME
|
||||||
opacity_(1.0),
|
opacity_(1.0),
|
||||||
overlap_(false)
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
point_symbolizer::point_symbolizer(path_expression_ptr file)
|
point_symbolizer::point_symbolizer(path_expression_ptr file)
|
||||||
: symbolizer_with_image(file),
|
: symbolizer_with_image(file),
|
||||||
opacity_(1.0),
|
opacity_(1.0),
|
||||||
overlap_(false)
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
point_symbolizer::point_symbolizer(point_symbolizer const& rhs)
|
point_symbolizer::point_symbolizer(point_symbolizer const& rhs)
|
||||||
: symbolizer_with_image(rhs),
|
: symbolizer_with_image(rhs),
|
||||||
opacity_(rhs.opacity_),
|
opacity_(rhs.opacity_),
|
||||||
overlap_(rhs.overlap_),
|
overlap_(rhs.overlap_)
|
||||||
matrix_(rhs.matrix_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void point_symbolizer::set_allow_overlap(bool overlap)
|
void point_symbolizer::set_allow_overlap(bool overlap)
|
||||||
|
@ -86,16 +68,5 @@ float point_symbolizer::get_opacity() const
|
||||||
return opacity_;
|
return opacity_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void point_symbolizer::set_transform(transform_type const& matrix)
|
|
||||||
{
|
|
||||||
matrix_ = matrix;
|
|
||||||
}
|
|
||||||
|
|
||||||
transform_type const& point_symbolizer::get_transform() const
|
|
||||||
{
|
|
||||||
return matrix_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue