Skip to content

Commit

Permalink
added font_engine impl - work in progress:)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemp committed Feb 21, 2006
1 parent 897341e commit bd17352
Show file tree
Hide file tree
Showing 11 changed files with 579 additions and 28 deletions.
5 changes: 3 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ opts = Options()
opts.Add('PREFIX', 'The install path "prefix"', '/usr/local')
opts.Add(PathOption('BOOST_INCLUDES', 'Search path for boost include files', '/usr/include'))
opts.Add(PathOption('BOOST_LIBS', 'Search path for boost library files', '/usr/lib'))
opts.Add(PathOption('FREETYPE_INCLUDES', 'Search path for FreeType include files', '/usr/include'))
opts.Add(PathOption('FREETYPE_LIBS', 'Search path for FreeType library files', '/usr/lib'))
opts.Add(PathOption('FREETYPE_INCLUDES', 'Search path for FreeType include files', '/opt/freetype/include/freetype2'))
opts.Add(PathOption('FREETYPE_LIBS', 'Search path for FreeType library files', '/opt/freetype/lib'))
opts.Add(PathOption('PNG_INCLUDES', 'Search path for libpng include files', '/usr/include'))
opts.Add(PathOption('PNG_LIBS', 'Search path for libpng include files', '/usr/lib'))
opts.Add(PathOption('JPEG_INCLUDES', 'Search path for libjpeg include files', '/usr/include'))
Expand Down Expand Up @@ -63,6 +63,7 @@ C_LIBSHEADERS = [
['tiff', 'tiff.h', True],
['z', 'zlib.h', True],
['jpeg', ['stdio.h','jpeglib.h'], True],
#['freetype', 'ft2build.h', True],
['pq', 'libpq-fe.h', False]
]

Expand Down
7 changes: 7 additions & 0 deletions include/agg_renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "feature_style_processor.hpp"
#include <boost/utility.hpp>
//#include "agg_font_freetype.h"
#include "font_engine_freetype.hpp"

namespace mapnik
{
Expand All @@ -31,6 +33,10 @@ namespace mapnik
private boost::noncopyable
{
agg_renderer(Map const& m, T & pixmap);
void start_map_processing();
void end_map_processing();
void start_layer_processing();
void end_layer_processing();
void process(point_symbolizer const& sym,Feature const& feature);
void process(line_symbolizer const& sym,Feature const& feature);
void process(line_pattern_symbolizer const& sym,Feature const& feature);
Expand All @@ -41,6 +47,7 @@ namespace mapnik
private:
T & pixmap_;
CoordTransform t_;
face_manager<freetype_engine> font_manager_;
};
}

Expand Down
13 changes: 3 additions & 10 deletions include/expression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace mapnik
}
std::string to_string() const
{
return value_.to_string();
return value_.to_expression_string();
}
~literal() {}
private:
Expand All @@ -88,8 +88,6 @@ namespace mapnik
property(property const& other)
: expression<FeatureT>(),
name_(other.name_)
//index_(other.index_),
//valid_(other.valid_)
{}

value get_value(FeatureT const& feature) const
Expand All @@ -108,20 +106,15 @@ namespace mapnik
{
return name_;
}
void set_index(size_t index)
{
//index_=index;
//valid_=true;
}

std::string to_string() const
{
return "["+name_+"]";
}
~property() {}
private:
std::string name_;
//size_t index_;
//bool valid_;

};
}

Expand Down
Loading

0 comments on commit bd17352

Please sign in to comment.