Silhouette of group or clippath

Hello,

is there any (possibly tricky) way, HOWTO stroke a silhouette
of a groupped path?

Consider following tests (i render them using batik 1.5):

   <defs>
      <rect id="rect" x="0" y="0" width="100" height="100"/>
      <g id="rect_pair_base">
         <use xlink:href="#rect" transform="translate(30, 30)"/>
         <use xlink:href="#rect" transform="translate(50, 50)"/>
      </g>
   </defs>
   <use xlink:href="#rect_pair_base"
         stroke="black" stroke-width="10" fill="none"/>

in this case both squares are stroked fully, so
there are lines also in the interior of the object.

   <defs>
      <rect id="rect" x="0" y="0" width="100" height="100"/>
      <g id="rect_pair_base">
         <use xlink:href="#rect" transform="translate(30, 30)"/>
         <use xlink:href="#rect" transform="translate(50, 50)"/>
      </g>      
      <clipPath id="cp_rect_pair">
         <use xlink:href="#rect_pair_base"/>
      </clipPath>
      <g id="rect_pair">
         <rect x="40" y="0" width="100" height="200"
               clip-path="url(#cp_rect_pair)"/>
      </g>
      <clipPath id="cp_inv_rect_pair">
            <rect x="-5000" y="-5000" width="10000" height="10000"/>
            <use xlink:href="#rect_pair"/>
      </clipPath>
   </defs>

   <use xlink:href="#rect_pair"
         stroke="red" stroke-width="10" fill="none"/>

in this case the clip-path is applied after stroking, so
result are two discrete lines.

But i want to draw an outline (silhouette) along the border
of the grouped squares avoiding creating single path manually.

Is it possible ? (avoiding overpainting interior of the group -
it is not suitable in some cases)

Thanks, filip

Received on Wednesday, 23 July 2003 04:34:50 UTC