From 10a14bbda362f8ac494904d1c9c65ae18e6b9007 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 27 May 2011 04:16:56 +0000 Subject: [PATCH] formatting --- bindings/python/mapnik_python.cpp | 139 ++++++++++++++++-------------- 1 file changed, 75 insertions(+), 64 deletions(-) diff --git a/bindings/python/mapnik_python.cpp b/bindings/python/mapnik_python.cpp index bd7e314ca..8512468c2 100644 --- a/bindings/python/mapnik_python.cpp +++ b/bindings/python/mapnik_python.cpp @@ -84,94 +84,105 @@ void export_inmem_metawriter(); static Pycairo_CAPI_t *Pycairo_CAPI; #endif -void render(const mapnik::Map& map,mapnik::image_32& image, double scale_factor = 1.0 , unsigned offset_x = 0u , unsigned offset_y = 0u) +void render(const mapnik::Map& map, + mapnik::image_32& image, + double scale_factor = 1.0, + unsigned offset_x = 0u, + unsigned offset_y = 0u) { Py_BEGIN_ALLOW_THREADS - try - { - mapnik::agg_renderer ren(map,image,scale_factor,offset_x, offset_y); - ren.apply(); - } - catch (...) - { - Py_BLOCK_THREADS - throw; - } + try + { + mapnik::agg_renderer ren(map,image,scale_factor,offset_x, offset_y); + ren.apply(); + } + catch (...) + { + Py_BLOCK_THREADS + throw; + } Py_END_ALLOW_THREADS - } +} #if defined(HAVE_CAIRO) && defined(HAVE_PYCAIRO) -void render3(const mapnik::Map& map,PycairoSurface* surface, unsigned offset_x = 0, unsigned offset_y = 0) +void render3(const mapnik::Map& map, + PycairoSurface* surface, + unsigned offset_x = 0, + unsigned offset_y = 0) { Py_BEGIN_ALLOW_THREADS - try - { - Cairo::RefPtr s(new Cairo::Surface(surface->surface)); - mapnik::cairo_renderer ren(map,s,offset_x, offset_y); - ren.apply(); - } - catch (...) - { - Py_BLOCK_THREADS - throw; - } + try + { + Cairo::RefPtr s(new Cairo::Surface(surface->surface)); + mapnik::cairo_renderer ren(map,s,offset_x, offset_y); + ren.apply(); + } + catch (...) + { + Py_BLOCK_THREADS + throw; + } Py_END_ALLOW_THREADS - } +} -void render4(const mapnik::Map& map,PycairoSurface* surface) +void render4(const mapnik::Map& map, PycairoSurface* surface) { Py_BEGIN_ALLOW_THREADS - try - { - Cairo::RefPtr s(new Cairo::Surface(surface->surface)); - mapnik::cairo_renderer ren(map,s); - ren.apply(); - } - catch (...) - { - Py_BLOCK_THREADS - throw; - } + try + { + Cairo::RefPtr s(new Cairo::Surface(surface->surface)); + mapnik::cairo_renderer ren(map,s); + ren.apply(); + } + catch (...) + { + Py_BLOCK_THREADS + throw; + } Py_END_ALLOW_THREADS - } +} -void render5(const mapnik::Map& map,PycairoContext* context, unsigned offset_x = 0, unsigned offset_y = 0) +void render5(const mapnik::Map& map, + PycairoContext* context, + unsigned offset_x = 0, + unsigned offset_y = 0) { Py_BEGIN_ALLOW_THREADS - try - { - Cairo::RefPtr c(new Cairo::Context(context->ctx)); - mapnik::cairo_renderer ren(map,c,offset_x, offset_y); - ren.apply(); - } - catch (...) - { - Py_BLOCK_THREADS - throw; - } + try + { + Cairo::RefPtr c(new Cairo::Context(context->ctx)); + mapnik::cairo_renderer ren(map,c,offset_x, offset_y); + ren.apply(); + } + catch (...) + { + Py_BLOCK_THREADS + throw; + } Py_END_ALLOW_THREADS - } +} -void render6(const mapnik::Map& map,PycairoContext* context) +void render6(const mapnik::Map& map, PycairoContext* context) { Py_BEGIN_ALLOW_THREADS - try - { - Cairo::RefPtr c(new Cairo::Context(context->ctx)); - mapnik::cairo_renderer ren(map,c); - ren.apply(); - } - catch (...) - { - Py_BLOCK_THREADS - throw; - } + try + { + Cairo::RefPtr c(new Cairo::Context(context->ctx)); + mapnik::cairo_renderer ren(map,c); + ren.apply(); + } + catch (...) + { + Py_BLOCK_THREADS + throw; + } Py_END_ALLOW_THREADS - } +} #endif + void render_tile_to_file(const mapnik::Map& map, unsigned offset_x, unsigned offset_y, unsigned width, unsigned height,