repack svg::path_attributes - drops 387 -> 376 (then 360 with gradient packing) - refs #2631
This commit is contained in:
parent
2a5dd5e924
commit
014af51d95
1 changed files with 44 additions and 45 deletions
|
@ -36,90 +36,89 @@ namespace svg {
|
|||
|
||||
struct path_attributes
|
||||
{
|
||||
unsigned index;
|
||||
mapnik::gradient fill_gradient;
|
||||
mapnik::gradient stroke_gradient;
|
||||
agg::trans_affine transform;
|
||||
double opacity;
|
||||
agg::rgba8 fill_color;
|
||||
double fill_opacity;
|
||||
agg::rgba8 stroke_color;
|
||||
double stroke_opacity;
|
||||
double miter_limit;
|
||||
double stroke_width;
|
||||
unsigned index;
|
||||
agg::rgba8 fill_color;
|
||||
agg::rgba8 stroke_color;
|
||||
agg::line_join_e line_join;
|
||||
agg::line_cap_e line_cap;
|
||||
bool fill_flag;
|
||||
bool stroke_flag;
|
||||
bool even_odd_flag;
|
||||
bool visibility_flag;
|
||||
bool display_flag;
|
||||
agg::line_join_e line_join;
|
||||
agg::line_cap_e line_cap;
|
||||
double miter_limit;
|
||||
double stroke_width;
|
||||
agg::trans_affine transform;
|
||||
mapnik::gradient fill_gradient;
|
||||
mapnik::gradient stroke_gradient;
|
||||
|
||||
// Empty constructor
|
||||
path_attributes() :
|
||||
index(0),
|
||||
fill_gradient(),
|
||||
stroke_gradient(),
|
||||
transform(),
|
||||
opacity(1.0),
|
||||
fill_color(agg::rgba(0,0,0)),
|
||||
fill_opacity(1.0),
|
||||
stroke_color(agg::rgba(0,0,0)),
|
||||
stroke_opacity(1.0),
|
||||
miter_limit(4.0),
|
||||
stroke_width(1.0),
|
||||
index(0),
|
||||
fill_color(agg::rgba(0,0,0)),
|
||||
stroke_color(agg::rgba(0,0,0)),
|
||||
line_join(agg::miter_join),
|
||||
line_cap(agg::butt_cap),
|
||||
fill_flag(true),
|
||||
stroke_flag(false),
|
||||
even_odd_flag(false),
|
||||
visibility_flag(true),
|
||||
display_flag(true),
|
||||
line_join(agg::miter_join),
|
||||
line_cap(agg::butt_cap),
|
||||
miter_limit(4.0),
|
||||
stroke_width(1.0),
|
||||
transform(),
|
||||
fill_gradient(),
|
||||
stroke_gradient()
|
||||
display_flag(true)
|
||||
{
|
||||
}
|
||||
|
||||
// Copy constructor
|
||||
path_attributes(const path_attributes& attr)
|
||||
: index(attr.index),
|
||||
path_attributes(path_attributes const& attr)
|
||||
: fill_gradient(attr.fill_gradient),
|
||||
stroke_gradient(attr.stroke_gradient),
|
||||
transform(attr.transform),
|
||||
opacity(attr.opacity),
|
||||
fill_color(attr.fill_color),
|
||||
fill_opacity(attr.fill_opacity),
|
||||
stroke_color(attr.stroke_color),
|
||||
stroke_opacity(attr.stroke_opacity),
|
||||
miter_limit(attr.miter_limit),
|
||||
stroke_width(attr.stroke_width),
|
||||
index(attr.index),
|
||||
fill_color(attr.fill_color),
|
||||
stroke_color(attr.stroke_color),
|
||||
line_join(attr.line_join),
|
||||
line_cap(attr.line_cap),
|
||||
fill_flag(attr.fill_flag),
|
||||
stroke_flag(attr.stroke_flag),
|
||||
even_odd_flag(attr.even_odd_flag),
|
||||
visibility_flag(attr.visibility_flag),
|
||||
display_flag(attr.display_flag),
|
||||
line_join(attr.line_join),
|
||||
line_cap(attr.line_cap),
|
||||
miter_limit(attr.miter_limit),
|
||||
stroke_width(attr.stroke_width),
|
||||
transform(attr.transform),
|
||||
fill_gradient(attr.fill_gradient),
|
||||
stroke_gradient(attr.stroke_gradient)
|
||||
display_flag(attr.display_flag)
|
||||
{}
|
||||
|
||||
// Copy constructor with new index value
|
||||
path_attributes(path_attributes const& attr, unsigned idx)
|
||||
: index(idx),
|
||||
: fill_gradient(attr.fill_gradient),
|
||||
stroke_gradient(attr.stroke_gradient),
|
||||
transform(attr.transform),
|
||||
opacity(attr.opacity),
|
||||
fill_color(attr.fill_color),
|
||||
fill_opacity(attr.fill_opacity),
|
||||
stroke_color(attr.stroke_color),
|
||||
stroke_opacity(attr.stroke_opacity),
|
||||
miter_limit(attr.miter_limit),
|
||||
stroke_width(attr.stroke_width),
|
||||
index(idx),
|
||||
fill_color(attr.fill_color),
|
||||
stroke_color(attr.stroke_color),
|
||||
line_join(attr.line_join),
|
||||
line_cap(attr.line_cap),
|
||||
fill_flag(attr.fill_flag),
|
||||
stroke_flag(attr.stroke_flag),
|
||||
even_odd_flag(attr.even_odd_flag),
|
||||
visibility_flag(attr.visibility_flag),
|
||||
display_flag(attr.display_flag),
|
||||
line_join(attr.line_join),
|
||||
line_cap(attr.line_cap),
|
||||
miter_limit(attr.miter_limit),
|
||||
stroke_width(attr.stroke_width),
|
||||
transform(attr.transform),
|
||||
fill_gradient(attr.fill_gradient),
|
||||
stroke_gradient(attr.stroke_gradient)
|
||||
display_flag(attr.display_flag)
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue