[xep-support] The perfect triangle

Mark Cilia Vincenti markciliavincenti at gmail.com
Wed Dec 17 01:17:00 PST 2008


Hi,

I have a table with 2 columns:

The left column has the background color #BEBEBE.
The right column has triangle.svg as a background image.

I have this SVG:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg viewBox="0 0 57 104" version="1.1" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 0,104 57,0" fill="#BEBEBE" />
</svg>

This produces something that looks a bit like antialiasing at the top of the
image from what I can see. In fact by putting the whole table inside a block
with background-color="red", it was apparent. And it prints as well.

So I tried this instead:

 <?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg viewBox="0 0 57 104" version="1.1" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 0,104 57,0" fill="#BEBEBE" stroke="#BEBEBE"
stroke-width="1" />
</svg>

This still shows the red background at the top at certain percentages, but
it's less obvious. However more alarmingly is that the top right corner
looks like it's chopped off. It's no longer pointed.

How can I achieve this please?

Full FO code here:

<fo:block background-color="red">
 <fo:table width="100%" space-after.optimum="6pt">
  <fo:table-column />
  <fo:table-column column-width="5mm" />
  <fo:table-body>
   <fo:table-row height="5mm">
    <fo:table-cell background-color="#BEBEBE">
     <fo:block margin-left="1mm" line-height="5mm" font-size="10.5pt"
color="#FFFFFF" font-weight="bold">This is a long sentence and it may or may
not wrap.</fo:block>
    </fo:table-cell>
    <fo:table-cell rx:background-content-height="100%"
rx:background-content-width="5mm" rx:background-scaling="non-uniform"
background-repeat="no-repeat" background="url('triangle.svg')" />
   </fo:table-row>
  </fo:table-body>
 </fo:table>
</fo:block>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20081217/e6d82abb/attachment.html>


More information about the Xep-support mailing list