<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="ydp96a1a498yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><div dir="ltr" data-setdir="false">The fantastic, @cassiecodes on twitter has found a solution to this using <span><span class="ydp962c07dfcss-901oao ydp962c07dfcss-16my406 ydp962c07dfr-poiln3 ydp962c07dfr-bcqeeo ydp962c07dfr-qvutc0">paint order stroke, it seems like a longer term solution is inset or offset strokes.</span></span><br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><a href="https://twitter.com/cassiecodes/status/1390338810911862790" rel="nofollow" target="_blank">https://twitter.com/cassiecodes/status/1390338810911862790</a></div><div dir="ltr" data-setdir="false"><a href="https://codepen.io/cassie-codes/pen/f39366e86f926d44389158e352d093a8" rel="nofollow" target="_blank" class="enhancr_card_1112014477">SVG transparent stroke.</a></div><div><br></div><div id="ydp14a04906enhancr_card_1112014477" class="ydp14a04906yahoo-link-enhancr-card ydp14a04906ymail-preserve-class ydp14a04906ymail-preserve-style" 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" contenteditable="false"><a 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;" class="ydp14a04906yahoo-enhancr-cardlink" rel="nofollow" target="_blank"><table class="ydp14a04906card-wrapper ydp14a04906yahoo-ignore-table" style="max-width:400px" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td width="400"><table class="ydp14a04906card ydp14a04906yahoo-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 class="ydp14a04906card-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"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:0;left:0;"><v:fill type="frame" color="#000000" src="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"/></v:rect><![endif]--><table class="ydp14a04906card-overlay-container-table ydp14a04906yahoo-ignore-table" style="width:100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td class="ydp14a04906card-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"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:-18px;left:0;"><v:fill type="pattern" color="#000000" src="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"/><v:textbox inset="0,0,20px,0"><![endif]--><table class="ydp14a04906yahoo-ignore-table" style="width: 100%; min-height: 175px;" height="175" border="0"><tbody><tr><td class="ydp14a04906card-richInfo2" style="text-align:left;padding:15px 0 0 15px;vertical-align:top"></td><td class="ydp14a04906card-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top"><div class="ydp14a04906card-share-container"></div></td></tr></tbody></table><!--[if gte mso 9]></v:textbox></v:rect><![endif]--></td></tr></tbody></table></td></tr><tr><td><table class="ydp14a04906card-info ydp14a04906yahoo-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 style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px"></td><td 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="ydp14a04906card-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="ydp14a04906card-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></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Now there's a solution I'll open bug for this.<br></div><div><br></div><div class="ydp96a1a498signature">S++</div></div>
        <div><br></div><div><br></div>
        
        </div><div id="yahoo_quoted_0783594260" class="yahoo_quoted">
            <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></div>
                <div><br></div>
                <div><div id="yiv6852274483"><div><div class="yiv6852274483ydp5c5d9ea1yahoo-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="yiv6852274483ydp5c5d9ea1signature">S++</div></div>
        <div><br clear="none"></div><div><br clear="none"></div>
        
        </div><div class="yiv6852274483yqt0459286207" id="yiv6852274483yqt69027"><div class="yiv6852274483yahoo_quoted" id="yiv6852274483yahoo_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="yiv6852274483yqt2324800707" id="yiv6852274483yqtfd44312"><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="yiv6852274483yqt2324800707" id="yiv6852274483yqtfd57371"><br clear="none"></div></div></div>
            </div>
        </div></div></div></div></div>
            </div>
        </div></body></html>