Merge branch 'master' into compositing

This commit is contained in:
Artem Pavlenko 2012-03-22 09:14:49 +00:00
commit f0b6fffcc9
4 changed files with 30 additions and 1 deletions

View file

@ -1068,7 +1068,7 @@ if not preconfigured:
# libxml2 should be optional but is currently not
# https://github.com/mapnik/mapnik/issues/913
if conf.parse_config('XML2_CONFIG'):
if conf.parse_config('XML2_CONFIG',checks='--cflags'):
env['HAS_LIBXML2'] = True
LIBSHEADERS = [

View file

@ -73,6 +73,7 @@ if env['THREADING'] == 'multi':
if env['RUNTIME_LINK'] == 'static':
if 'icuuc' in env['ICU_LIB_NAME']:
lib_env['LIBS'].append('icudata')
lib_env['LIBS'].append('icui18n')
else:
if env['INTERNAL_LIBAGG']:
lib_env['LIBS'].insert(0, 'agg')

View file

@ -45,6 +45,7 @@ extern "C"
#ifdef HAVE_CAIRO
#include <mapnik/cairo_renderer.hpp>
#include <cairo-features.h>
#endif
#include <boost/foreach.hpp>
@ -371,17 +372,40 @@ void save_to_cairo_file(mapnik::Map const& map,
unsigned width = map.width();
unsigned height = map.height();
if (type == "pdf")
{
#if defined(CAIRO_HAS_PDF_SURFACE)
surface = Cairo::PdfSurface::create(filename,width,height);
#else
throw ImageWriterException("PDFSurface not supported in the cairo backend");
#endif
}
#if defined(CAIRO_HAS_SVG_SURFACE)
else if (type == "svg")
{
surface = Cairo::SvgSurface::create(filename,width,height);
}
#endif
#if defined(CAIRO_HAS_PS_SURFACE)
else if (type == "ps")
{
surface = Cairo::PsSurface::create(filename,width,height);
}
#endif
#if defined(CAIRO_HAS_IMAGE_SURFACE)
else if (type == "ARGB32")
{
surface = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32,width,height);
}
else if (type == "RGB24")
{
surface = Cairo::ImageSurface::create(Cairo::FORMAT_RGB24,width,height);
}
#endif
else
{
throw ImageWriterException("unknown file type: " + type);
}
Cairo::RefPtr<Cairo::Context> context = Cairo::Context::create(surface);
// TODO - expose as user option

View file

@ -1069,7 +1069,9 @@ void map_parser::parse_text_symbolizer(rule & rule, xml_node const& sym)
}
if (strict_ &&
!placement_finder->defaults.format.fontset.size())
{
ensure_font_face(placement_finder->defaults.format.face_name);
}
text_symbolizer text_symbol = text_symbolizer(placement_finder);
parse_metawriter_in_symbolizer(text_symbol, sym);
@ -1096,7 +1098,9 @@ void map_parser::parse_shield_symbolizer(rule & rule, xml_node const& sym)
placement_finder->defaults.from_xml(sym, fontsets_);
if (strict_ &&
!placement_finder->defaults.format.fontset.size())
{
ensure_font_face(placement_finder->defaults.format.face_name);
}
shield_symbolizer shield_symbol = shield_symbolizer(placement_finder);
/* Symbolizer specific attributes. */