+ preserve previously set alpha channel in
stroke/fill assignment so constructs like : style="fill-opacity:0.5;fill:blue" work with current svg attributes implementation
This commit is contained in:
parent
4dcef9d1a3
commit
cc7e803b9d
1 changed files with 4 additions and 0 deletions
|
@ -194,14 +194,18 @@ public:
|
|||
void fill(const agg::rgba8& f)
|
||||
{
|
||||
path_attributes& attr = cur_attr();
|
||||
double a = attr.fill_color.opacity();
|
||||
attr.fill_color = f;
|
||||
attr.fill_color.opacity(a * f.opacity());
|
||||
attr.fill_flag = true;
|
||||
}
|
||||
|
||||
void stroke(const agg::rgba8& s)
|
||||
{
|
||||
path_attributes& attr = cur_attr();
|
||||
double a = attr.stroke_color.opacity();
|
||||
attr.stroke_color = s;
|
||||
attr.stroke_color.opacity(a * s.opacity());
|
||||
attr.stroke_flag = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue