attributes not opacity (ref 1c704447b7
)
This commit is contained in:
parent
1c704447b7
commit
1b940bebcc
1 changed files with 8 additions and 8 deletions
|
@ -33,16 +33,16 @@ namespace mapnik
|
|||
{
|
||||
|
||||
void render_vector_marker(cairo_context & context, svg::svg_path_adapter & svg_path,
|
||||
agg::pod_bvector<svg::path_attributes> const & attributes,
|
||||
agg::pod_bvector<svg::path_attributes> const & attrs,
|
||||
box2d<double> const& bbox, agg::trans_affine const& tr,
|
||||
double opacity_)
|
||||
double opacity)
|
||||
{
|
||||
using namespace mapnik::svg;
|
||||
agg::trans_affine transform;
|
||||
|
||||
for(unsigned i = 0; i < attributes.size(); ++i)
|
||||
for(unsigned i = 0; i < attrs.size(); ++i)
|
||||
{
|
||||
mapnik::svg::path_attributes const& attr = attributes[i];
|
||||
mapnik::svg::path_attributes const& attr = attrs[i];
|
||||
if (!attr.visibility_flag)
|
||||
continue;
|
||||
cairo_save_restore guard(context);
|
||||
|
@ -75,14 +75,14 @@ void render_vector_marker(cairo_context & context, svg::svg_path_adapter & svg_p
|
|||
}
|
||||
if(attr.fill_gradient.get_gradient_type() != NO_GRADIENT)
|
||||
{
|
||||
cairo_gradient g(attr.fill_gradient,attr.fill_opacity * attr.opacity * opacity_);
|
||||
cairo_gradient g(attr.fill_gradient,attr.fill_opacity * attr.opacity * opacity);
|
||||
|
||||
context.set_gradient(g,bbox);
|
||||
context.fill();
|
||||
}
|
||||
else if(attr.fill_flag)
|
||||
{
|
||||
double fill_opacity = attr.fill_opacity * attr.opacity * opacity_ * attr.fill_color.opacity();
|
||||
double fill_opacity = attr.fill_opacity * attr.opacity * opacity * attr.fill_color.opacity();
|
||||
context.set_color(attr.fill_color.r/255.0,attr.fill_color.g/255.0,
|
||||
attr.fill_color.b/255.0, fill_opacity);
|
||||
context.fill();
|
||||
|
@ -98,13 +98,13 @@ void render_vector_marker(cairo_context & context, svg::svg_path_adapter & svg_p
|
|||
context.set_line_cap(line_cap_enum(attr.line_cap));
|
||||
context.set_line_join(line_join_enum(attr.line_join));
|
||||
context.set_miter_limit(attr.miter_limit);
|
||||
cairo_gradient g(attr.stroke_gradient,attr.fill_opacity * attr.opacity * opacity_);
|
||||
cairo_gradient g(attr.stroke_gradient,attr.fill_opacity * attr.opacity * opacity);
|
||||
context.set_gradient(g,bbox);
|
||||
context.stroke();
|
||||
}
|
||||
else if (attr.stroke_flag)
|
||||
{
|
||||
double stroke_opacity = attr.stroke_opacity * attr.opacity * opacity_ * attr.stroke_color.opacity();
|
||||
double stroke_opacity = attr.stroke_opacity * attr.opacity * opacity * attr.stroke_color.opacity();
|
||||
context.set_color(attr.stroke_color.r/255.0,attr.stroke_color.g/255.0,
|
||||
attr.stroke_color.b/255.0, stroke_opacity);
|
||||
context.set_line_width(attr.stroke_width);
|
||||
|
|
Loading…
Add table
Reference in a new issue