<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div class="ydpd546717yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><div dir="ltr" data-setdir="false"><a href="https://gitlab.freedesktop.org/cairo/cairo/-/issues/478" rel="nofollow" target="_blank">https://gitlab.freedesktop.org/cairo/cairo/-/issues/478</a></div><div><br></div><div class="ydpd546717signature">S++</div></div>
        <div><br></div><div><br></div>
        
        </div><div id="yahoo_quoted_0820352509" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, May 6, 2021, 5:23:30 PM GMT+1, Stuart Axon <stuaxo2@yahoo.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv5231637682"><div><div class="yiv5231637682ydp96a1a498yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><div dir="ltr">The fantastic, @cassiecodes on twitter has found a solution to this using <span><span class="yiv5231637682ydp962c07dfcss-901oao yiv5231637682ydp962c07dfcss-16my406 yiv5231637682ydp962c07dfr-poiln3 yiv5231637682ydp962c07dfr-bcqeeo yiv5231637682ydp962c07dfr-qvutc0">paint order stroke, it seems like a longer term solution is inset or offset strokes.</span></span><br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr"><a rel="nofollow noopener noreferrer" shape="rect" target="_blank" href="https://twitter.com/cassiecodes/status/1390338810911862790">https://twitter.com/cassiecodes/status/1390338810911862790</a></div><div dir="ltr"><a rel="nofollow noopener noreferrer" shape="rect" class="yiv5231637682enhancr_card_1112014477" target="_blank" href="https://codepen.io/cassie-codes/pen/f39366e86f926d44389158e352d093a8">SVG transparent stroke.</a></div><div><br clear="none"></div><div class="yiv5231637682ydp14a04906yahoo-link-enhancr-card yiv5231637682ydp14a04906ymail-preserve-class yiv5231637682ydp14a04906ymail-preserve-style" id="yiv5231637682ydp14a04906enhancr_card_1112014477" style="max-width:400px;font-family:YahooSans, Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif;" data-url="https://codepen.io/cassie-codes/pen/f39366e86f926d44389158e352d093a8" data-type="YENHANCER" data-size="MEDIUM"><a rel="nofollow noopener noreferrer" shape="rect" class="yiv5231637682ydp14a04906yahoo-enhancr-cardlink" target="_blank" href="https://codepen.io/cassie-codes/pen/f39366e86f926d44389158e352d093a8" style="text-decoration-line:none !important;text-decoration-style:solid !important;text-decoration-color:currentcolor !important;color:rgb(0, 0, 0) !important;"><table class="yiv5231637682ydp14a04906card-wrapper yiv5231637682ydp14a04906yahoo-ignore-table" style="max-width:400px;" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td colspan="1" rowspan="1" width="400"><table class="yiv5231637682ydp14a04906card yiv5231637682ydp14a04906yahoo-ignore-table" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224, 228, 233);border-radius:2px;" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td colspan="1" rowspan="1" class="yiv5231637682ydp14a04906card-primary-image-cell" style="background-color:rgb(0, 0, 0);background-repeat:no-repeat;background-size:cover;position:relative;border-radius:2px 2px 0px 0px;min-height:175px;" valign="top" height="175" bgcolor="#000000" background="https://s.yimg.com/lo/api/res/1.2/vwIcJYdrjqwoAGNeLZLijA--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://assets.codepen.io/756881/internal/screenshots/pens/f39366e86f926d44389158e352d093a8.default.png?fit=cover&format=auto&ha=false&height=540&quality=75&v=2&version=1620317506&width=960.cf.jpg"><table class="yiv5231637682ydp14a04906card-overlay-container-table yiv5231637682ydp14a04906yahoo-ignore-table" style="width:100%;" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td colspan="1" rowspan="1" class="yiv5231637682ydp14a04906card-overlay-cell" style="background-color:transparent;border-radius:2px 2px 0px 0px;min-height:175px;" valign="top" bgcolor="transparent" background="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"><table class="yiv5231637682ydp14a04906yahoo-ignore-table" style="width:100%;min-height:175px;" height="175" border="0"><tbody><tr><td colspan="1" rowspan="1" class="yiv5231637682ydp14a04906card-richInfo2" style="text-align:left;padding:15px 0 0 15px;vertical-align:top;"></td><td colspan="1" rowspan="1" class="yiv5231637682ydp14a04906card-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top;"><div class="yiv5231637682ydp14a04906card-share-container"></div></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td colspan="1" rowspan="1"><table class="yiv5231637682ydp14a04906card-info yiv5231637682ydp14a04906yahoo-ignore-table" style="background-color:rgb(255, 255, 255);background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;position:relative;z-index:2;width:100%;max-width:400px;border-radius:0px 0px 2px 2px;border-top:1px solid rgb(224, 228, 233);" cellspacing="0" cellpadding="0" border="0" align="center"><tbody><tr><td colspan="1" rowspan="1" style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px;"></td><td colspan="1" rowspan="1" style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;font-family:YahooSans, Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif;border-radius:0 0 2px 0;"><h2 class="yiv5231637682ydp14a04906card-title" style="font-size:14px;line-height:19px;margin:0px 0px 6px;font-family:YahooSans, Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif;color:rgb(38, 40, 42);max-width:314px;">SVG transparent stroke.</h2><p class="yiv5231637682ydp14a04906card-description" style="font-size:12px;line-height:16px;margin:0px;color:rgb(151, 155, 167);">...</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div><br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">Now there's a solution I'll open bug for this.<br clear="none"></div><div><br clear="none"></div><div class="yiv5231637682ydp96a1a498signature">S++</div></div>
        <div><br clear="none"></div><div><br clear="none"></div>
        
        </div><div class="yiv5231637682yqt1739169768" id="yiv5231637682yqt88452"><div class="yiv5231637682yahoo_quoted" id="yiv5231637682yahoo_quoted_0783594260">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, March 25, 2021, 5:55:04 PM GMT, Stuart Axon <stuaxo2@yahoo.com> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                <div><div id="yiv5231637682"><div><div class="yiv5231637682ydp5c5d9ea1yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><div dir="ltr">Thanks for looking at this.</div><div dir="ltr"><br clear="none"></div><div dir="ltr">Specifying the version, I can see the same result.  It seems likely there is a way to achieve the expected output, but I think I need to understand SVG a bit more first.   <br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">I failed on my first pass understanding the filter dialog in Inkscape but will try again from that end, or just editing the raw SVG.<br clear="none"></div><div dir="ltr"><br clear="none"></div><div><br clear="none"></div><div class="yiv5231637682ydp5c5d9ea1signature">S++</div></div>
        <div><br clear="none"></div><div><br clear="none"></div>
        
        </div><div class="yiv5231637682yqt0459286207" id="yiv5231637682yqt69027"><div class="yiv5231637682yahoo_quoted" id="yiv5231637682yahoo_quoted_6979809570">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, March 25, 2021, 4:06:43 PM GMT, Uli Schlachter <psychon@znc.in> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                <div><div dir="ltr">Hi,<br clear="none"><div class="yiv5231637682yqt2324800707" id="yiv5231637682yqtfd44312"><br clear="none">Am 24.03.21 um 02:22 schrieb Stuart Axon:<br clear="none">> I've been trying to generate an SVG using SVGSurface with a fill and an alpha stroke, <br clear="none">> with OPERATOR_SOURCE to ensure the stroke draws over the fill, but this seemsto generate <image> tags in the SVG.<br clear="none">> Toy example and output + XML:<br clear="none">> <a rel="nofollow noopener noreferrer" shape="rect" target="_blank" href="https://gist.github.com/stuaxo/b525a47d33f5f3074b1be7c693f6b6e6">https://gist.github.com/stuaxo/b525a47d33f5f3074b1be7c693f6b6e6</a><br clear="none">> Is there any way to render fill + stroke (with alpha) and only output vector data ?This seems like a common operation, but whatever I try outputs SVGs full of <image>s.<br clear="none">> <br clear="none">> For Shoebot, this has meant our SVGs become very very large, enough to eat all your ram if you try and open them in Inkscape.</div><br clear="none"><br clear="none">I ported your example code to C (attached). Don't ask me why, but I<br clear="none">experimented with the SVG version. And it helped!<br clear="none"><br clear="none">More specifically, adding this line:<br clear="none"><br clear="none">  cairo_svg_surface_restrict_to_version(s, CAIRO_SVG_VERSION_1_2);<br clear="none"><br clear="none">...causes a small difference in the output with/without operator SOURCE:<br clear="none">The path's style gets a new "comp-op:src;clip-to-self:true" entry.<br clear="none">Everything else stays the same (well, except the header saying<br clear="none">version="1.2" instead of the previous version="1.1").<br clear="none"><br clear="none">So, I do not really have much clue about SVG, but I guess this means that:<br clear="none">- cairo defaults to SVG 1.1<br clear="none">- SVG 1.1 does not support operator SOURCE<br clear="none"><br clear="none">Cheers,<br clear="none">Uli<br clear="none">-- <br clear="none">Homophobia - The fear that another man will treat you the way you treat<br clear="none">women.<div class="yiv5231637682yqt2324800707" id="yiv5231637682yqtfd57371"><br clear="none"></div></div></div>
            </div>
        </div></div></div></div></div>
            </div>
        </div></div></div></div></div>
            </div>
        </div></body></html>