void MapPainterSVG::DrawGround(const Projection& projection, const MapParameter& parameter, const FillStyle& style) { stream << " <rect x=\"" << 0 << "\" y=\"" << 0 << "\" width=\"" << projection.GetWidth() << "\" height=\"" << projection.GetHeight() << "\"" << std::endl; stream << " fill=\"" << GetColorValue(style.GetFillColor()) << "\"" << "/>" << std::endl; }
void MapPainterOpenGL::DrawGround(const Projection& projection, const MapParameter& /*parameter*/, const FillStyle& style) { glColor4d(style.GetFillColor().GetR(), style.GetFillColor().GetG(), style.GetFillColor().GetB(), style.GetFillColor().GetA()); glBegin(GL_QUADS); glVertex3d(0,projection.GetHeight(),0.0); // Top Left glVertex3d(projection.GetWidth(),projection.GetHeight(),0.0); // Top Right glVertex3d(projection.GetWidth(),0.0,0.0); // Bottom Right glVertex3d(0,0,0.0); // Bottom Left glEnd(); }
void MapPainterAgg::DrawGround(const Projection& projection, const MapParameter& parameter, const FillStyle& style) { agg::path_storage path; path.move_to(0,0); path.line_to(projection.GetWidth(),0); path.line_to(projection.GetWidth(),projection.GetHeight()); path.line_to(0, projection.GetHeight()); path.close_polygon(); renderer_aa->color(agg::rgba(style.GetFillColor().GetR(), style.GetFillColor().GetG(), style.GetFillColor().GetB(), 1)); rasterizer->filling_rule(agg::fill_non_zero); rasterizer->add_path(path); agg::render_scanlines(*rasterizer,*scanlineP8,*renderer_aa); }
bool MapPainterSVG::DrawMap(const Projection& projection, const MapParameter& parameter, const MapData& data, std::ostream& stream) { this->stream.rdbuf(stream.rdbuf()); typeConfig=styleConfig->GetTypeConfig(); WriteHeader(projection.GetWidth(),projection.GetHeight()); Draw(projection, parameter, data); WriteFooter(); fillStyleNameMap.clear(); lineStyleNameMap.clear(); return true; }