mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 786216 - Fix evenodd fill-rule. r=jwatt
This commit is contained in:
parent
5f0b06009c
commit
f974ac08a0
@ -309,6 +309,7 @@ random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == tspan-rotate-06.svg tspa
|
||||
== viewBox-valid-01.svg pass.svg
|
||||
== viewBox-valid-02.xhtml pass.svg
|
||||
== viewport-percent-graphic-user-01.svg pass.svg
|
||||
== winding-01.svg pass.svg
|
||||
|
||||
== svg-effects-area-unzoomed.xhtml svg-effects-area-unzoomed-ref.xhtml
|
||||
== svg-effects-area-zoomed-in.xhtml svg-effects-area-zoomed-in-ref.xhtml
|
||||
|
11
layout/reftests/svg/winding-01.svg
Normal file
11
layout/reftests/svg/winding-01.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||
|
||||
<title>Testcase for path with evenodd winding</title>
|
||||
|
||||
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=786216 -->
|
||||
|
||||
<rect width="100%" height="100%" fill="lime"/>
|
||||
|
||||
<path fill-rule="evenodd" fill="red" d="M100,100 l 50,0 0,50 -50,0 0,-50 50,0 0,50 -50,0 0,-50z"/>
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 343 B |
@ -1894,6 +1894,12 @@ nsSVGUtils::SetupCairoFillPaint(nsIFrame *aFrame, gfxContext* aContext)
|
||||
const nsStyleSVG* style = aFrame->GetStyleSVG();
|
||||
if (style->mFill.mType == eStyleSVGPaintType_None)
|
||||
return false;
|
||||
|
||||
if (style->mFillRule == NS_STYLE_FILL_RULE_EVENODD)
|
||||
aContext->SetFillRule(gfxContext::FILL_RULE_EVEN_ODD);
|
||||
else
|
||||
aContext->SetFillRule(gfxContext::FILL_RULE_WINDING);
|
||||
|
||||
float opacity = MaybeOptimizeOpacity(aFrame, style->mFillOpacity);
|
||||
nsSVGPaintServerFrame *ps =
|
||||
nsSVGEffects::GetPaintServer(aFrame, &style->mFill, nsSVGEffects::FillProperty());
|
||||
|
Loading…
Reference in New Issue
Block a user