remove hardcoding of color_type in grid_marker_helper

This commit is contained in:
Dane Springmeyer 2012-12-19 18:25:17 -08:00
parent e53914463a
commit c8e5094858

View file

@ -44,8 +44,8 @@ namespace mapnik {
template <typename BufferType, typename Rasterizer, typename PixFmt, typename RendererBase, typename RendererType, typename Detector, typename PixMapType> template <typename BufferType, typename Rasterizer, typename PixFmt, typename RendererBase, typename RendererType, typename Detector, typename PixMapType>
struct raster_markers_rasterizer_dispatch_grid struct raster_markers_rasterizer_dispatch_grid
{ {
typedef mapnik::gray32 color_type;
typedef typename RendererBase::pixfmt_type pixfmt_type; typedef typename RendererBase::pixfmt_type pixfmt_type;
typedef typename RendererBase::pixfmt_type::color_type color_type;
raster_markers_rasterizer_dispatch_grid(BufferType & render_buffer, raster_markers_rasterizer_dispatch_grid(BufferType & render_buffer,
Rasterizer & ras, Rasterizer & ras,
@ -156,7 +156,7 @@ struct raster_markers_rasterizer_dispatch_grid
ras_.line_to_d(p[4],p[5]); ras_.line_to_d(p[4],p[5]);
ras_.line_to_d(p[6],p[7]); ras_.line_to_d(p[6],p[7]);
RendererType ren(renb_); RendererType ren(renb_);
ren.color(mapnik::gray32(feature_.id())); ren.color(color_type(feature_.id()));
agg::render_scanlines(ras_, sl_, ren); agg::render_scanlines(ras_, sl_, ren);
} }