Dear list,<br><br>lets assume, that I have two overlapping rectangles.
A big one (0, 0, 100, 100 defined as bigBoxPath) and a small one ( 40,
60, 60, 120 defined as smallBoxPath) that has some part of it outside
the bigger rectangle. The outer rect for that whould be something like
(0, 0, 100, 120, defined as outerBoxPath) without taking in account,
that a stroke would make that bounding rect bigger because of how the
stroke works.<br>
<br>I can create a path and fill them both, but now I want to stroke
around the outline of the complete shape, but no &#39;stroke&#39; should appear
inside the shape. Also it would be nice, if this stroke can happen with
a dashed line...<br>
<br>Any hints how to do that or where to look to find out? This also
should work with any shape for the two paths: rectangles are just the
simplest ones...<br><br>The ultimate goal is actually to draw a speech
bubble with multiple tipping points, while the speech bubble might be
an ellipse shape or even some random shape...<br>
I am not trying to do that with one path, because at some point the
tipping point needs to be moved, and then the construction of the path
would get crazy, so my goal at the moment is to draw the &#39;textbox&#39; and
the tipping points as separate objects...<br>
<br>Thank you so much in advance,<br>Stefan<br><br>PS-1:<br>Yes, I
searched the archive and saw the posts about interactive drawing (which
I am doing) and the union of paths, but they did not really help...<br><br>PS-2:<br>
I experimented with some clipping like in the following code fragment,
that is using my own library that is wrapping the Cairo commands, but
it should be obvious what it does.<br>It
does almost what I want but the outline of the smaller box is not
drawn, because the clipping of the bigger box is using the fill shape,
so the intersections are ugly...<br>
<br>    context-&gt;Save();<br><br>    context-&gt;SetColor(0, 0, 255, 128);<br>    context-&gt;Path(bigBoxPath);<br>    context-&gt;Path(smallBoxPath);<br>    context-&gt;Fill();<br><br>    context-&gt;SetFillRule(CAIRO_<div>

FILL_RULE_EVEN_ODD);<br>
    context-&gt;Path(smallBoxPath);<br>    context-&gt;Path(outerBoxPath);<br>    context-&gt;Clip();<br>    context-&gt;SetFillRule( CAIRO_FILL_RULE_WINDING);<br><br>    context-&gt;SetColor(128, 0, 0, 255);<br>    context-&gt;SetLineWidth(frameWidth);<br>


    context-&gt;Path(bigBoxPath);<br>    context-&gt;Stroke();<br>    context-&gt;ResetClip();<br><br>    context-&gt;SetFillRule( CAIRO_FILL_RULE_EVEN_ODD);<br>    context-&gt;Path(outerBoxPath);<br>    context-&gt;Path(bigBoxPath);<br>


    context-&gt;Clip();<br>    context-&gt;SetFillRule( CAIRO_FILL_RULE_WINDING);<br><br>    context-&gt;SetColor(128, 0, 0, 255);<br>    context-&gt;SetLineWidth(frameWidth);<br>    context-&gt;Path(smallBoxPath);<br>    context-&gt;Stroke();<br>


    context-&gt;ResetClip();<br><br>    context-&gt;Restore();</div>