<?xml version="1.0" ?>
+<!--
+
+This file provides all the information for the svg elements and
+attributes. The information corresponds to the svg dtd.
+
+This information is used to create the code for the svg elements
+and the property mappings.
+
+-->
<elements prefix="svg" ns="http://www.w3.org/2000/svg">
<commonAttributes ref="stdAttrs">
<attribute>id</attribute>
<attribute>requiredFeatures</attribute>
<attribute>requiredExtensions</attribute>
<attribute>systemLanguage</attribute>
+ </commonAttributes>
+ <commonAttributes ref="xlinkRefAttrs">
+ <attribute>xmlns:xlink</attribute>
+ <attribute>xlink:type</attribute>
+ <attribute>xlink:role</attribute>
+ <attribute>xlink:arcrole</attribute>
+ <attribute>xlink:title</attribute>
+ <attribute>xlink:show</attribute>
+ <attribute>xlink:actuate</attribute>
+ </commonAttributes>
+ <commonAttributes ref="graphicsElementEvents">
+ <attribute>onfocusin</attribute>
+ <attribute>onfocusout</attribute>
+ <attribute>onactivate</attribute>
+ <attribute>onclick</attribute>
+ <attribute>onmousedown</attribute>
+ <attribute>onmouseup</attribute>
+ <attribute>onmouseover</attribute>
+ <attribute>onmousemove</attribute>
+ <attribute>onmouseout</attribute>
+ <attribute>onload</attribute>
+ </commonAttributes>
+ <commonAttributes ref="documentEvents">
+ <attribute>onunload</attribute>
+ <attribute>onabort</attribute>
+ <attribute>onerror</attribute>
+ <attribute>onresize</attribute>
+ <attribute>onscroll</attribute>
+ <attribute>onzoom</attribute>
+ </commonAttributes>
+ <commonAttributes ref="animationEvents">
+ <attribute>onbegin</attribute>
+ <attribute>onend</attribute>
+ <attribute>onrepeat</attribute>
</commonAttributes>
<commonAttributes ref="PresentationAttributes-All">
<includeAttributes ref="PresentationAttributes-Containers"/>
<attribute>clip</attribute>
<attribute>overflow</attribute>
</commonAttributes>
+ <commonAttributes ref="filter_primitive_attributes">
+ <attribute>x</attribute>
+ <attribute>y</attribute>
+ <attribute>width</attribute>
+ <attribute>height</attribute>
+ <attribute>result</attribute>
+ </commonAttributes>
+ <commonAttributes ref="filter_primitive_attributes_with_in">
+ <includeAttributes ref="filter_primitive_attributes"/>
+ <attribute>in</attribute>
+ </commonAttributes>
+ <commonAttributes ref="component_transfer_function_attributes">
+ <attribute>type</attribute>
+ <attribute>tableValues</attribute>
+ <attribute>slope</attribute>
+ <attribute>intercept</attribute>
+ <attribute>amplitude</attribute>
+ <attribute>exponent</attribute>
+ <attribute>offset</attribute>
+ </commonAttributes>
+ <commonAttributes ref="animElementAttrs">
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>xlink:href</attribute>
+ </commonAttributes>
+ <commonAttributes ref="animAttributeAttrs">
+ <attribute>attributeName</attribute>
+ <attribute>attributeType</attribute>
+ </commonAttributes>
+ <commonAttributes ref="animTargetAttrs">
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>xlink:href</attribute>
+ <attribute>attributeName</attribute>
+ <attribute>attributeType</attribute>
+ </commonAttributes>
+ <commonAttributes ref="animTimingAttrs">
+ <attribute>begin</attribute>
+ <attribute>dur</attribute>
+ <attribute>end</attribute>
+ <attribute>min</attribute>
+ <attribute>max</attribute>
+ <attribute>restart</attribute>
+ <attribute>repeatCount</attribute>
+ <attribute>repeatDur</attribute>
+ <attribute>fill</attribute>
+ </commonAttributes>
+ <commonAttributes ref="animValueAttrs">
+ <attribute>calcMode</attribute>
+ <attribute>values</attribute>
+ <attribute>keyTimes</attribute>
+ <attribute>keySplines</attribute>
+ <attribute>from</attribute>
+ <attribute>to</attribute>
+ <attribute>by</attribute>
+ </commonAttributes>
+ <commonAttributes ref="animAdditionAttrs">
+ <attribute>additive</attribute>
+ <attribute>accumulate</attribute>
+ </commonAttributes>
<element>
<tagname>a</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
- <attribute>xlnk:href</attribute>
+ <attribute>xmlns:xlink</attribute>
+ <attribute>xlink:type</attribute>
<attribute>xlink:role</attribute>
<attribute>xlink:arcrole</attribute>
<attribute>xlink:title</attribute>
<attribute>xlink:show</attribute>
<attribute>xlink:actuate</attribute>
+ <attribute>xlink:href</attribute>
<includeAttributes ref="testAttrs"/>
<includeAttributes ref="langSpaceAttrs"/>
<attribute>externalResourcesRequired</attribute>
<attribute>style</attribute>
<includeAttributes ref="PresentationAttributes-All"/>
<attribute>transform</attribute>
- <includeAttributes ref="graphicsElementsEvents"/>
+ <includeAttributes ref="graphicsElementEvents"/>
<attribute>target</attribute>
</attributes>
</element>
<includeAttributes ref="stdAttrs"/>
<includeAttributes ref="testAttrs"/>
<includeAttributes ref="langSpaceAttrs"/>
- <attribute>externalResourceRequired</attribute>
+ <attribute>externalResourcesRequired</attribute>
<attribute>class</attribute>
<attribute>style</attribute>
<includeAttributes ref="PresentationAttributes-FillStroke"/>
<includeAttributes ref="PresentationAttributes-Graphics"/>
<attribute>transform</attribute>
- <includeAttributes ref="graphicsElementsEvents"/>
+ <includeAttributes ref="graphicsElementEvents"/>
<attribute>cx</attribute>
<attribute>cy</attribute>
<attribute>r</attribute>
</element>
<element>
<tagname>altGlyph</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <attribute>xlink:href</attribute>
+ <attribute>glyphRef</attribute>
+ <attribute>format</attribute>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-FillStroke"/>
+ <includeAttributes ref="PresentationAttributes-FontSpecification"/>
+ <includeAttributes ref="PresentationAttributes-Graphics"/>
+ <includeAttributes ref="PresentationAttributes-TextContentElements"/>
+ <includeAttributes ref="graphicsElementEvents"/>
+ <attribute>x</attribute>
+ <attribute>y</attribute>
+ <attribute>dx</attribute>
+ <attribute>dy</attribute>
+ <attribute>rotate</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>altGlyphDef</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>altGlyphItem</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
</attributes>
<tagname>animate</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <includeAttributes ref="animationEvents"/>
+ <includeAttributes ref="animElementAttrs"/>
+ <includeAttributes ref="animAttributeAttrs"/>
+ <includeAttributes ref="animTimingAttrs"/>
+ <includeAttributes ref="animValueAttrs"/>
+ <includeAttributes ref="animAdditionAttrs"/>
</attributes>
</element>
<element>
<tagname>animateColor</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <includeAttributes ref="animationEvents"/>
+ <includeAttributes ref="animElementAttrs"/>
+ <includeAttributes ref="animAttributeAttrs"/>
+ <includeAttributes ref="animTimingAttrs"/>
+ <includeAttributes ref="animValueAttrs"/>
+ <includeAttributes ref="animAdditionAttrs"/>
</attributes>
</element>
<element>
<tagname>animateMotion</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <includeAttributes ref="animationEvents"/>
+ <includeAttributes ref="animElementAttrs"/>
+ <includeAttributes ref="animTimingAttrs"/>
+ <attribute>calcMode</attribute>
+ <attribute>values</attribute>
+ <attribute>keyTimes</attribute>
+ <attribute>keySplines</attribute>
+ <attribute>from</attribute>
+ <attribute>to</attribute>
+ <attribute>by</attribute>
+ <includeAttributes ref="animAdditionAttrs"/>
+ <attribute>path</attribute>
+ <attribute>keyPoints</attribute>
+ <attribute>rotate</attribute>
+ <attribute>origin</attribute>
</attributes>
</element>
<element>
<tagname>animateTransform</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <includeAttributes ref="animationEvents"/>
+ <includeAttributes ref="animElementAttrs"/>
+ <includeAttributes ref="animAttributeAttrs"/>
+ <includeAttributes ref="animTimingAttrs"/>
+ <includeAttributes ref="animValueAttrs"/>
+ <includeAttributes ref="animAdditionAttrs"/>
+ <attribute>type</attribute>
</attributes>
</element>
<element>
<tagname>clipPath</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
- <attribute>id</attribute>
+ <includeAttributes ref="testAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
<attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-FillStroke"/>
+ <includeAttributes ref="PresentationAttributes-FontSpecification"/>
+ <includeAttributes ref="PresentationAttributes-Graphics"/>
+ <includeAttributes ref="PresentationAttributes-TextContentElements"/>
+ <includeAttributes ref="PresentationAttributes-TextElements"/>
+ <attribute>transform</attribute>
<attribute>clipPathUnits</attribute>
</attributes>
</element>
+ <element>
+ <tagname>color-profile</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>xlink:href</attribute>
+ <attribute>local</attribute>
+ <attribute>name</attribute>
+ <attribute>rendering-intent</attribute>
+ </attributes>
+ </element>
<element>
<tagname>cursor</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>xlink:href</attribute>
+ <includeAttributes ref="testAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>x</attribute>
+ <attribute>y</attribute>
</attributes>
</element>
<element>
<tagname>defs</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <includeAttributes ref="graphicsElementEvents"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <attribute>transform</attribute>
</attributes>
</element>
<element addText="true">
<tagname>desc</tagname>
<attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <includeAttributes ref="StructuredText"/>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
</attributes>
</element>
<element>
<includeAttributes ref="stdAttrs"/>
<includeAttributes ref="testAttrs"/>
<includeAttributes ref="langSpaceAttrs"/>
- <attribute>externalResourceRequired</attribute>
+ <attribute>externalResourcesRequired</attribute>
<attribute>class</attribute>
<attribute>style</attribute>
<includeAttributes ref="PresentationAttributes-FillStroke"/>
<includeAttributes ref="PresentationAttributes-Graphics"/>
<attribute>transform</attribute>
- <includeAttributes ref="graphicsElementsEvents"/>
+ <includeAttributes ref="graphicsElementEvents"/>
<attribute>cx</attribute>
<attribute>cy</attribute>
<attribute>rx</attribute>
<attribute>ry</attribute>
</attributes>
</element>
+ <element>
+ <tagname>feBlend</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ <attribute>in2</attribute>
+ <attribute>mode</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feColorMatrix</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ <attribute>type</attribute>
+ <attribute>values</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feComponentTransfer</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feComposite</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ <attribute>in2</attribute>
+ <attribute>operator</attribute>
+ <attribute>k1</attribute>
+ <attribute>k2</attribute>
+ <attribute>k3</attribute>
+ <attribute>k4</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feConvolveMatrix</tagname>
+ <attributes>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ <attribute>order</attribute>
+ <attribute>kernelMatrix</attribute>
+ <attribute>divisor</attribute>
+ <attribute>bias</attribute>
+ <attribute>targetX</attribute>
+ <attribute>targetY</attribute>
+ <attribute>edgeMode</attribute>
+ <attribute>kernelUnitLength</attribute>
+ <attribute>preserveAlpha</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feDistantLight</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <attribute>azimuth</attribute>
+ <attribute>elevation</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feDiffuseLighting</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-LightingEffects"/>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ <attribute>surfaceScale</attribute>
+ <attribute>diffuseConstant</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feDisplacementMap</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ <attribute>in2</attribute>
+ <attribute>scale</attribute>
+ <attribute>xChannelSelector</attribute>
+ <attribute>yChannelSelector</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feFlood</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-feFlood"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feFuncR</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="component_transfer_function_attributes"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feFuncG</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="component_transfer_function_attributes"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feFuncB</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="component_transfer_function_attributes"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feFuncA</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="component_transfer_function_attributes"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feGaussianBlur</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ <attribute>stdDeviation</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feOffset</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>fePointLight</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <attribute>x</attribute>
+ <attribute>y</attribute>
+ <attribute>z</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feImage</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>xlink:href</attribute>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <attribute>transform</attribute>
+ <includeAttributes ref="filter_primitive_attributes"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feMerge</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="filter_primitive_attributes"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feMergeNode</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <attribute>in</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feMorphology</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ <attribute>operator</attribute>
+ <attribute>radius</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feOffset</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ <attribute>dx</attribute>
+ <attribute>dy</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feSpecularLighting</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-LightingEffects"/>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ <attribute>surfaceScale</attribute>
+ <attribute>specularConstant</attribute>
+ <attribute>specularExponent</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feSpotLight</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <attribute>x</attribute>
+ <attribute>y</attribute>
+ <attribute>z</attribute>
+ <attribute>pointsAtX</attribute>
+ <attribute>pointsAtY</attribute>
+ <attribute>pointsAtZ</attribute>
+ <attribute>specularExponent</attribute>
+ <attribute>limitingConeAngle</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feTile</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="filter_primitive_attributes_with_in"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>feTurbulence</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="filter_primitive_attributes"/>
+ <attribute>baseFrequency</attribute>
+ <attribute>numOctaves</attribute>
+ <attribute>seed</attribute>
+ <attribute>stitchTiles</attribute>
+ <attribute>type</attribute>
+ </attributes>
+ </element>
<element>
<tagname>filter</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>xlink:href</attribute>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <attribute>filterUnits</attribute>
+ <attribute>primitiveUnits</attribute>
+ <attribute>x</attribute>
+ <attribute>y</attribute>
+ <attribute>width</attribute>
+ <attribute>height</attribute>
+ <attribute>filterRes</attribute>
</attributes>
</element>
<element>
<tagname>font</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <attribute>horiz-origin-x</attribute>
+ <attribute>horiz-origin-y</attribute>
+ <attribute>horiz-adv-x</attribute>
+ <attribute>vert-origin-x</attribute>
+ <attribute>vert-origin-y</attribute>
+ <attribute>vert-adv-y</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>font-face</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <attribute>font-family</attribute>
+ <attribute>font-style</attribute>
+ <attribute>font-variant</attribute>
+ <attribute>font-weight</attribute>
+ <attribute>font-stretch</attribute>
+ <attribute>font-size</attribute>
+ <attribute>unicode-range</attribute>
+ <attribute>units-per-em</attribute>
+ <attribute>panose-1</attribute>
+ <attribute>stemv</attribute>
+ <attribute>stemh</attribute>
+ <attribute>slope</attribute>
+ <attribute>cap-height</attribute>
+ <attribute>x-height</attribute>
+ <attribute>accent-height</attribute>
+ <attribute>ascent</attribute>
+ <attribute>descent</attribute>
+ <attribute>widths</attribute>
+ <attribute>bbox</attribute>
+ <attribute>ideographic</attribute>
+ <attribute>alphabetic</attribute>
+ <attribute>mathematical</attribute>
+ <attribute>hanging</attribute>
+ <attribute>v-ideographic</attribute>
+ <attribute>v-alphabetic</attribute>
+ <attribute>v-mathematical</attribute>
+ <attribute>v-hanging</attribute>
+ <attribute>underline-position</attribute>
+ <attribute>underline-thickness</attribute>
+ <attribute>strikethrough-position</attribute>
+ <attribute>strikethrough-thickness</attribute>
+ <attribute>overline-position</attribute>
+ <attribute>overline-thickness</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>font-face-src</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>font-face-uri</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>xlink:href</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>font-face-format</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <attribute>string</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>font-face-name</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <attribute>name</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>foreignObject</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <attribute>transform</attribute>
+ <includeAttributes ref="graphicsElementEvents"/>
+ <attribute>x</attribute>
+ <attribute>y</attribute>
+ <attribute>width</attribute>
+ <attribute>height</attribute>
+ <includeAttributes ref="StructuredText"/>
+ </attributes>
+ </element>
+ <element>
+ <tagname>definition-src</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>xlink:href</attribute>
</attributes>
</element>
<element>
<tagname>g</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
<includeAttributes ref="PresentationAttributes-All"/>
- <attribute>id</attribute>
+ <includeAttributes ref="graphicsElementEvents"/>
+ <attribute>externalResourcesRequired</attribute>
<attribute>style</attribute>
<attribute>transform</attribute>
<attribute>class</attribute>
<tagname>glyph</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <attribute>unicode</attribute>
+ <attribute>glyph-name</attribute>
+ <attribute>d</attribute>
+ <attribute>orientation</attribute>
+ <attribute>arabic-form</attribute>
+ <attribute>lang</attribute>
+ <attribute>horiz-adv-x</attribute>
+ <attribute>vert-origin-x</attribute>
+ <attribute>vert-origin-y</attribute>
+ <attribute>vert-adv-y</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>glyphRef</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>xlink:href</attribute>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-FontSpecification"/>
+ <attribute>glyphRef</attribute>
+ <attribute>format</attribute>
+ <attribute>x</attribute>
+ <attribute>y</attribute>
+ <attribute>dx</attribute>
+ <attribute>dy</attribute>
</attributes>
</element>
<element>
<tagname>hkern</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <attribute>u1</attribute>
+ <attribute>g1</attribute>
+ <attribute>u2</attribute>
+ <attribute>g2</attribute>
+ <attribute>k</attribute>
</attributes>
</element>
<element>
<tagname>image</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
- <attribute>id</attribute>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <includeAttributes ref="PresentationAttributes-Graphics"/>
+ <includeAttributes ref="PresentationAttributes-Images"/>
+ <includeAttributes ref="PresentationAttributes-Viewports"/>
+ <includeAttributes ref="graphicsElementEvents"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
<attribute>style</attribute>
<attribute>transform</attribute>
- <attribute>class</attribute>
+ <attribute>preserveAspectRatio</attribute>
<attribute>xlink:href</attribute>
<attribute>x</attribute>
<attribute>y</attribute>
<includeAttributes ref="stdAttrs"/>
<includeAttributes ref="testAttrs"/>
<includeAttributes ref="langSpaceAttrs"/>
- <attribute>externalResourceRequired</attribute>
+ <attribute>externalResourcesRequired</attribute>
<attribute>class</attribute>
<attribute>style</attribute>
<includeAttributes ref="PresentationAttributes-FillStroke"/>
<includeAttributes ref="PresentationAttributes-Graphics"/>
<includeAttributes ref="PresentationAttributes-Markers"/>
<attribute>transform</attribute>
- <includeAttributes ref="graphicsElementsEvents"/>
+ <includeAttributes ref="graphicsElementEvents"/>
<attribute>x1</attribute>
<attribute>x2</attribute>
<attribute>y1</attribute>
<tagname>linearGradient</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
- <attribute>id</attribute>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>xlink:href</attribute>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
<attribute>style</attribute>
- <attribute>transform</attribute>
+ <includeAttributes ref="PresentationAttributes-Gradients"/>
+ <attribute>gradientUnits</attribute>
+ <attribute>gradientTransform</attribute>
<attribute>class</attribute>
- <attribute>xlink:href</attribute>
<attribute>x1</attribute>
<attribute>y1</attribute>
<attribute>x2</attribute>
<attribute>y2</attribute>
- <attribute>gradientTransform</attribute>
<attribute>spreadMethod</attribute>
- <attribute>gradientUnits</attribute>
</attributes>
</element>
<element>
<tagname>marker</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <attribute>viewBox</attribute>
+ <attribute>preserveAspectRatio</attribute>
+ <attribute>refX</attribute>
+ <attribute>refY</attribute>
+ <attribute>markerUnits</attribute>
+ <attribute>markerWidth</attribute>
+ <attribute>markerHeight</attribute>
+ <attribute>orient</attribute>
</attributes>
</element>
<element>
<tagname>mask</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
- <attribute>id</attribute>
+ <includeAttributes ref="testAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
<attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <attribute>transform</attribute>
+ <attribute>maskUnits</attribute>
+ <attribute>maskContentUnits</attribute>
+ <attribute>x</attribute>
+ <attribute>y</attribute>
+ <attribute>width</attribute>
+ <attribute>height</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>metadata</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
</attributes>
</element>
<element>
<tagname>missing-glyph</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <attribute>d</attribute>
+ <attribute>horiz-adv-x</attribute>
+ <attribute>vert-origin-x</attribute>
+ <attribute>vert-origin-y</attribute>
+ <attribute>vert-adv-y</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>mpath</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>xlink:href</attribute>
+ <attribute>externalResourcesRequired</attribute>
</attributes>
</element>
<element>
<tagname>path</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
- <attribute>id</attribute>
+ <includeAttributes ref="testAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <includeAttributes ref="PresentationAttributes-FillStroke"/>
+ <includeAttributes ref="PresentationAttributes-Graphics"/>
+ <includeAttributes ref="PresentationAttributes-Markers"/>
+ <includeAttributes ref="graphicsElementEvents"/>
+ <attribute>externalResourcesRequired</attribute>
<attribute>style</attribute>
<attribute>transform</attribute>
<attribute>class</attribute>
<attribute>d</attribute>
+ <attribute>pathLength</attribute>
</attributes>
</element>
<element>
<tagname>pattern</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
- <attribute>id</attribute>
- <attribute>style</attribute>
- <attribute>transform</attribute>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
<attribute>class</attribute>
+ <attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <attribute>viewBox</attribute>
+ <attribute>preserveAspectRatio</attribute>
<attribute>xlink:href</attribute>
<attribute>width</attribute>
<attribute>height</attribute>
<attribute>x</attribute>
<attribute>y</attribute>
<attribute>patternUnits</attribute>
+ <attribute>patternContentUnits</attribute>
+ <attribute>patternTransform</attribute>
</attributes>
</element>
<element>
<includeAttributes ref="PresentationAttributes-Graphics"/>
<includeAttributes ref="PresentationAttributes-Markers"/>
<attribute>transform</attribute>
- <includeAttributes ref="graphicsElementsEvents"/>
+ <includeAttributes ref="graphicsElementEvents"/>
<attribute>points</attribute>
</attributes>
</element>
<includeAttributes ref="PresentationAttributes-Graphics"/>
<includeAttributes ref="PresentationAttributes-Markers"/>
<attribute>transform</attribute>
- <includeAttributes ref="graphicsElementsEvents"/>
+ <includeAttributes ref="graphicsElementEvents"/>
<attribute>points</attribute>
</attributes>
</element>
<tagname>radialGradient</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
- <attribute>id</attribute>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
<attribute>style</attribute>
- <attribute>transform</attribute>
<attribute>class</attribute>
+ <includeAttributes ref="PresentationAttributes-Gradients"/>
<attribute>gradientTransform</attribute>
<attribute>xlink:href</attribute>
<attribute>cx</attribute>
<attribute>fx</attribute>
<attribute>fy</attribute>
<attribute>gradientUnits</attribute>
+ <attribute>spreadMethod</attribute>
</attributes>
</element>
<element>
<includeAttributes ref="stdAttrs"/>
<includeAttributes ref="testAttrs"/>
<includeAttributes ref="langSpaceAttrs"/>
- <attribute>externalResourceRequired</attribute>
+ <attribute>externalResourcesRequired</attribute>
<attribute>class</attribute>
<attribute>style</attribute>
<includeAttributes ref="PresentationAttributes-FillStroke"/>
<includeAttributes ref="PresentationAttributes-Graphics"/>
<attribute>transform</attribute>
- <includeAttributes ref="graphicsElementsEvents"/>
+ <includeAttributes ref="graphicsElementEvents"/>
<attribute>x</attribute>
<attribute>y</attribute>
<attribute>width</attribute>
<tagname>set</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <includeAttributes ref="animationEvents"/>
+ <includeAttributes ref="animElementAttrs"/>
+ <includeAttributes ref="animAttributeAttrs"/>
+ <includeAttributes ref="animTimingAttrs"/>
+ <attribute>to</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>script</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <attribute>xlink:href</attribute>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>type</attribute>
</attributes>
</element>
<element>
<tagname>stop</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
- <attribute>id</attribute>
+ <attribute>class</attribute>
<attribute>style</attribute>
+ <includeAttributes ref="PresentationAttributes-Gradients"/>
<attribute>offset</attribute>
</attributes>
</element>
<tagname>style</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <attribute>xml:space</attribute>
+ <attribute>type</attribute>
+ <attribute>media</attribute>
+ <attribute>title</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>svg</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <includeAttributes ref="graphicsElementEvents"/>
+ <includeAttributes ref="documentEvents"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <attribute>viewBox</attribute>
+ <attribute>preserveAspectRatio</attribute>
+ <attribute>zoomAndPan</attribute>
+ <attribute>x</attribute>
+ <attribute>y</attribute>
+ <attribute>width</attribute>
+ <attribute>height</attribute>
+ <attribute>contentScriptType</attribute>
+ <attribute>contentStyleType</attribute>
</attributes>
</element>
<element>
<tagname>switch</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
- <attribute>id</attribute>
- <attribute>requiredFeatures</attribute>
- <attribute>requiredExtensions</attribute>
- <attribute>systemLanguage</attribute>
+ <includeAttributes ref="testAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <includeAttributes ref="PresentationAttributes-all"/>
+ <includeAttributes ref="graphicsElementEvents"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
+ <attribute>transform</attribute>
</attributes>
</element>
<element>
<tagname>symbol</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
- <attribute>id</attribute>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <includeAttributes ref="graphicsElementEvents"/>
+ <attribute>class</attribute>
<attribute>style</attribute>
<attribute>viewBox</attribute>
+ <attribute>preserveAspectRatio</attribute>
</attributes>
</element>
<element>
<attribute>xlink:href</attribute>
<includeAttributes ref="testAttrs"/>
<includeAttributes ref="langSpaceAttrs"/>
- <attribute>externalResourceRequired</attribute>
+ <attribute>externalResourcesRequired</attribute>
<attribute>class</attribute>
<attribute>style</attribute>
<includeAttributes ref="PresentationAttributes-FillStroke"/>
<includeAttributes ref="PresentationAttributes-FontSpecification"/>
<includeAttributes ref="PresentationAttributes-Graphics"/>
<includeAttributes ref="PresentationAttributes-TextContentElements"/>
- <includeAttributes ref="graphicsElementsEvents"/>
+ <includeAttributes ref="graphicsElementEvents"/>
<attribute>x</attribute>
<attribute>y</attribute>
<attribute>dx</attribute>
<includeAttributes ref="stdAttrs"/>
<includeAttributes ref="testAttrs"/>
<includeAttributes ref="langSpaceAttrs"/>
- <attribute>externalResourceRequired</attribute>
+ <attribute>externalResourcesRequired</attribute>
<attribute>class</attribute>
<attribute>style</attribute>
<includeAttributes ref="PresentationAttributes-FillStroke"/>
<includeAttributes ref="PresentationAttributes-FontSpecification"/>
<includeAttributes ref="PresentationAttributes-Graphics"/>
<includeAttributes ref="PresentationAttributes-TextContentElements"/>
- <includeAttributes ref="graphicsElementsEvents"/>
+ <includeAttributes ref="graphicsElementEvents"/>
<attribute>x</attribute>
<attribute>y</attribute>
<attribute>dx</attribute>
<includeAttributes ref="stdAttrs"/>
<includeAttributes ref="testAttrs"/>
<includeAttributes ref="langSpaceAttrs"/>
- <attribute>externalResourceRequired</attribute>
+ <attribute>externalResourcesRequired</attribute>
<attribute>class</attribute>
<attribute>style</attribute>
<includeAttributes ref="PresentationAttributes-FillStroke"/>
<includeAttributes ref="PresentationAttributes-TextContentElements"/>
<includeAttributes ref="PresentationAttributes-TextElements"/>
<attribute>transform</attribute>
- <includeAttributes ref="graphicsElementsEvents"/>
+ <includeAttributes ref="graphicsElementEvents"/>
<attribute>x</attribute>
<attribute>y</attribute>
<attribute>textLength</attribute>
<attribute>xlink:href</attribute>
<includeAttributes ref="langSpaceAttrs"/>
<includeAttributes ref="testAttrs"/>
- <attribute>externalResourceRequired</attribute>
+ <attribute>externalResourcesRequired</attribute>
<attribute>class</attribute>
<attribute>style</attribute>
<includeAttributes ref="PresentationAttributes-FillStroke"/>
<includeAttributes ref="PresentationAttributes-FontSpecification"/>
<includeAttributes ref="PresentationAttributes-Graphics"/>
<includeAttributes ref="PresentationAttributes-TextContentElements"/>
- <includeAttributes ref="graphicsElementsEvents"/>
+ <includeAttributes ref="graphicsElementEvents"/>
<attribute>startOffset</attribute>
<attribute>textLength</attribute>
<attribute>lengthAdjust</attribute>
<tagname>title</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <includeAttributes ref="StructuredText"/>
+ <attribute>class</attribute>
+ <attribute>style</attribute>
</attributes>
</element>
<element>
<tagname>use</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
- <attribute>id</attribute>
+ <includeAttributes ref="xlinkRefAttrs"/>
+ <includeAttributes ref="testAttrs"/>
+ <includeAttributes ref="langSpaceAttrs"/>
+ <includeAttributes ref="PresentationAttributes-All"/>
+ <includeAttributes ref="graphicsElementEvents"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>class</attribute>
<attribute>style</attribute>
<attribute>transform</attribute>
<attribute>xlink:href</attribute>
<tagname>vkern</tagname>
<attributes>
<includeAttributes ref="stdAttrs"/>
+ <attribute>u1</attribute>
+ <attribute>g1</attribute>
+ <attribute>u2</attribute>
+ <attribute>g2</attribute>
+ <attribute>k</attribute>
+ </attributes>
+ </element>
+ <element>
+ <tagname>view</tagname>
+ <attributes>
+ <includeAttributes ref="stdAttrs"/>
+ <attribute>externalResourcesRequired</attribute>
+ <attribute>viewBox</attribute>
+ <attribute>preserveAspectRatio</attribute>
+ <attribute>zoomAndPan</attribute>
+ <attribute>viewTarget</attribute>
</attributes>
</element>
</elements>
import org.apache.fop.layout.*;
import org.apache.fop.fonts.*;
import org.apache.fop.render.pdf.*;
+import org.apache.fop.image.*;
+import org.apache.fop.datatypes.ColorSpace;
import org.apache.batik.ext.awt.g2d.*;
* @see org.apache.batik.ext.awt.g2d.AbstractGraphics2D
*/
public class PDFGraphics2D extends AbstractGraphics2D {
+ protected PDFDocument pdfDoc;
+
+ protected FontState fontState;
+
boolean standalone = false;
/** the PDF Document being created */
- protected PDFDocument pdfDoc;
+ //protected PDFDocument pdfDoc;
- protected FontState fontState;
+ //protected FontState fontState;
/** the current stream to add PDF commands to */
StringWriter currentStream = new StringWriter();
- PDFStream pdfStream;
-
/** the current (internal) font name */
protected String currentFontName;
protected int currentXPosition = 0;
/** the current colour for use in svg */
- private PDFColor currentColour = new PDFColor(0, 0, 0);
+ PDFColor currentColour = new PDFColor(0, 0, 0);
- private FontInfo fontInfo;
+ FontInfo fontInfo;
/**
* Create a new PDFGraphics2D with the given pdf document info.
fontState = fs;
}
- /**
- * Create a new PDFGraphics2D with the given pdf document info.
- * This is used to create a Graphics object for use inside an already
- * existing document.
- * Maybe this could be handled as a subclass (PDFDocumentGraphics2d)
- */
- public PDFGraphics2D(boolean textAsShapes, OutputStream stream)
+ public PDFGraphics2D(boolean textAsShapes)
{
super(textAsShapes);
- standalone = true;
- this.pdfDoc = new PDFDocument();
- this.pdfDoc.setProducer("FOP SVG Renderer");
- pdfStream = this.pdfDoc.makeStream();
-
- currentFontName = "";
- currentFontSize = 0;
- currentYPosition = 0;
- currentXPosition = 0;
-// fontState = fs;
-
- // end part
- /*
- FontSetup.addToResources(this.pdfDoc, fontInfo);
- pdfStream.write(getString())
- this.pdfResources = this.pdfDoc.getResources();
- currentPage = this.pdfDoc.makePage(this.pdfResources, currentStream,
- page.getWidth() / 1000,
- page.getHeight() / 1000, page);
- this.pdfDoc.output(stream);
- */
-
- }
+ }
public String getString() {
return currentStream.toString();
return new PDFGraphics2D(this);
}
- public void setColor(Color c){
- super.setColor(c);
- currentColour = new PDFColor(c.getRed(), c.getGreen(), c.getBlue());
- currentStream.write(currentColour.getColorSpaceOut(false));
- currentStream.write(currentColour.getColorSpaceOut(true));
- }
-
/**
* Draws as much of the specified image as is currently available.
* The image is drawn with its top-left corner at
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
*/
public boolean drawImage(Image img, int x, int y, ImageObserver observer){
- System.err.println("drawImage");
-/* int width = img.getWidth(observer);
- int height = img.getHeight(observer);
- FopImage fopimg = new FopImage() {
- };
+ System.err.println("drawImage:x, y");
+
+ final int width = img.getWidth(observer);
+ final int height = img.getHeight(observer);
+ if(width == -1 || height == -1) {
+ return false;
+ }
+
+ Dimension size = new Dimension(width, height);
+ BufferedImage buf = buildBufferedImage(size);
+
+ java.awt.Graphics2D g = buf.createGraphics();
+ g.setComposite(AlphaComposite.SrcOver);
+ g.setBackground(new Color(1, 1, 1, 0));
+ g.setPaint(new Color(1, 1, 1, 0));
+ g.fillRect(0, 0, width, height);
+ g.clip(new Rectangle(0, 0, buf.getWidth(), buf.getHeight()));
+
+ if(!g.drawImage(img, 0, 0, observer)) {
+ return false;
+ }
+ g.dispose();
+
+ final byte[] result = new byte[buf.getWidth() * buf.getHeight() * 3];
+
+ Raster raster = buf.getData();
+ DataBuffer bd = raster.getDataBuffer();
+
+ int count = 0;
+ switch(bd.getDataType()) {
+ case DataBuffer.TYPE_INT:
+ int[][] idata = ((DataBufferInt)bd).getBankData();
+ for(int i = 0; i < idata.length; i++) {
+ for(int j = 0; j < idata[i].length; j++) {
+ //System.out.println("data:" + ((idata[i][j] >> 24) & 0xFF));
+ if(((idata[i][j] >> 24) & 0xFF) != 255) {
+System.out.println("data:" + ((idata[i][j] >> 24) & 0xFF));
+ result[count++] = (byte)0xFF;
+ result[count++] = (byte)0xFF;
+ result[count++] = (byte)0xFF;
+ } else {
+ result[count++] = (byte)((idata[i][j] >> 16) & 0xFF);
+ result[count++] = (byte)((idata[i][j] >> 8) & 0xFF);
+ result[count++] = (byte)((idata[i][j]) & 0xFF);
+ }
+ }
+ }
+ break;
+ default:
+ // error
+ break;
+ }
+
+ try {
+ FopImage fopimg = new TempImage(width, height, result);
int xObjectNum = this.pdfDoc.addImage(fopimg);
- currentStream.add("q\n" + (((float) w) / 1000f) +
- " 0 0 " + (((float) h) / 1000f) + " " +
+ /*currentStream.write("q\n" + (((float) width)) +
+ " 0 0 " + (((float) height)) + " " +
x + " " +
- ((float)(y - h)) + " cm\n" + "/Im" +
+ ((float)(y - height)) + " cm\n" + "/Im" +
xObjectNum + " Do\nQ\n");*/
+ AffineTransform at = getTransform();
+ double[] matrix = new double[6];
+ at.getMatrix(matrix);
+ currentStream.write("q\n" + matrix[0] +
+ " " + matrix[1] + " " + matrix[2] + " " + matrix[3] + " " +
+ matrix[4] + " " +
+ matrix[5] + " cm\n");
+ currentStream.write("" + width +
+ " 0 0 " + (-height) + " " +
+ x + " " +
+ (y + height) + " cm\n" + "/Im" +
+ xObjectNum + " Do\nQ\n");
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
return true;
}
+ public BufferedImage buildBufferedImage(Dimension size) {
+ return new BufferedImage(size.width, size.height,
+ BufferedImage.TYPE_INT_ARGB);
+ }
+
+ class TempImage implements FopImage {
+ int m_height;
+ int m_width;
+ int m_bitsPerPixel;
+ ColorSpace m_colorSpace;
+ int m_bitmapSiye;
+ byte[] m_bitmaps;
+ PDFColor transparent = new PDFColor(255, 255, 255);
+
+ TempImage(int width, int height, byte[] result) throws FopImageException
+ {
+ this.m_height = height;
+ this.m_width = width;
+ this.m_bitsPerPixel = 8;
+ this.m_colorSpace = new ColorSpace(ColorSpace.DEVICE_RGB);
+ //this.m_isTransparent = false;
+ //this.m_bitmapsSize = this.m_width * this.m_height * 3;
+ this.m_bitmaps = result;
+ }
+
+ public String getURL() {return "" + m_bitmaps;}
+
+ // image size
+ public int getWidth() throws FopImageException
+ {
+ return m_width;
+ }
+
+ public int getHeight() throws FopImageException
+ {return m_height;}
+
+ // DeviceGray, DeviceRGB, or DeviceCMYK
+ public ColorSpace getColorSpace() throws FopImageException
+ {return m_colorSpace;}
+
+ // bits per pixel
+ public int getBitsPerPixel() throws FopImageException
+ {return m_bitsPerPixel;}
+
+ // For transparent images
+ public boolean isTransparent() throws FopImageException
+ {return transparent != null;}
+ public PDFColor getTransparentColor() throws FopImageException
+ {return transparent;}
+
+ // get the image bytes, and bytes properties
+
+ // get uncompressed image bytes
+ public byte[] getBitmaps() throws FopImageException
+ {return m_bitmaps;}
+// width * (bitsPerPixel / 8) * height, no ?
+ public int getBitmapsSize() throws FopImageException
+ {return m_width * m_height * 3;}
+
+ // get compressed image bytes
+ // I don't know if we really need it, nor if it
+ // should be changed...
+ public byte[] getRessourceBytes() throws FopImageException
+ {return null;}
+ public int getRessourceBytesSize() throws FopImageException
+ {return 0;}
+ // return null if no corresponding PDFFilter
+ public PDFFilter getPDFFilter() throws FopImageException
+ {return null;}
+
+ // release memory
+ public void close() {}
+
+ }
+
+
/**
* Draws as much of the specified image as has already been scaled
* to fit inside the specified rectangle.
* @see #setComposite
*/
public void draw(Shape s){
- System.out.println("draw(Shape)");
+ //System.out.println("draw(Shape)");
+ Color c = getColor();
+ currentColour = new PDFColor(c.getRed(), c.getGreen(), c.getBlue());
+ currentStream.write(currentColour.getColorSpaceOut(true));
+ c = getBackground();
+ PDFColor col = new PDFColor(c.getRed(), c.getGreen(), c.getBlue());
+ currentStream.write(col.getColorSpaceOut(false));
+
PDFNumber pdfNumber = new PDFNumber();
- PathIterator iter = s.getPathIterator(new AffineTransform());
+ PathIterator iter = s.getPathIterator(getTransform());
while(!iter.isDone()) {
double vals[] = new double[6];
int type = iter.currentSegment(vals);
System.err.println("drawString(AttributedCharacterIterator)");
}
-
-
/**
* Fills the interior of a <code>Shape</code> using the settings of the
* <code>Graphics2D</code> context. The rendering attributes applied
* @see #setClip
*/
public void fill(Shape s){
- System.err.println("fill");
+ //System.err.println("fill");
+ Color c = getColor();
+ currentColour = new PDFColor(c.getRed(), c.getGreen(), c.getBlue());
+ currentStream.write(currentColour.getColorSpaceOut(true));
+ c = getBackground();
+ PDFColor col = new PDFColor(c.getRed(), c.getGreen(), c.getBlue());
+ currentStream.write(col.getColorSpaceOut(false));
+
PDFNumber pdfNumber = new PDFNumber();
- PathIterator iter = s.getPathIterator(new AffineTransform());
+ PathIterator iter = s.getPathIterator(getTransform());
while(!iter.isDone()) {
double vals[] = new double[6];
int type = iter.currentSegment(vals);
*/
public GraphicsConfiguration getDeviceConfiguration(){
System.out.println("getDeviceConviguration");
- return null;
+ return GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
}
/**
--- /dev/null
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved. *
+ * ------------------------------------------------------------------------- *
+ * This software is published under the terms of the Apache Software License *
+ * version 1.1, a copy of which has been included with this distribution in *
+ * the LICENSE file. *
+ *****************************************************************************/
+
+package org.apache.fop.svg;
+
+import java.awt.AlphaComposite;
+import java.awt.Cursor;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.Paint;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.Shape;
+
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Dimension2D;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.geom.*;
+import java.awt.font.*;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.batik.transcoder.*;
+
+import org.apache.batik.bridge.BridgeContext;
+import org.apache.batik.bridge.BridgeException;
+import org.apache.batik.bridge.GVTBuilder;
+import org.apache.batik.bridge.UserAgent;
+import org.apache.batik.bridge.ViewBox;
+
+import org.apache.batik.dom.svg.DefaultSVGContext;
+import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
+import org.apache.batik.dom.svg.SVGDOMImplementation;
+import org.apache.batik.dom.svg.SVGOMDocument;
+import org.apache.batik.dom.util.DocumentFactory;
+
+import org.apache.batik.ext.awt.image.GraphicsUtil;
+
+import org.apache.batik.gvt.GraphicsNode;
+import org.apache.batik.gvt.GraphicsNodeRenderContext;
+import org.apache.batik.gvt.event.EventDispatcher;
+import org.apache.batik.gvt.renderer.ImageRenderer;
+import org.apache.batik.gvt.renderer.ImageRendererFactory;
+
+import org.apache.batik.transcoder.TranscoderException;
+import org.apache.batik.transcoder.TranscoderOutput;
+import org.apache.batik.transcoder.TranscodingHints;
+import org.apache.batik.transcoder.XMLAbstractTranscoder;
+import org.apache.batik.transcoder.image.resources.Messages;
+
+import org.apache.batik.transcoder.keys.BooleanKey;
+import org.apache.batik.transcoder.keys.FloatKey;
+import org.apache.batik.transcoder.keys.LengthKey;
+import org.apache.batik.transcoder.keys.PaintKey;
+import org.apache.batik.transcoder.keys.PaintKey;
+import org.apache.batik.transcoder.keys.Rectangle2DKey;
+import org.apache.batik.transcoder.keys.StringKey;
+import org.apache.batik.transcoder.*;
+
+import org.apache.batik.util.SVGConstants;
+
+import org.apache.batik.bridge.*;
+import org.apache.batik.swing.svg.*;
+import org.apache.batik.swing.gvt.*;
+import org.apache.batik.gvt.*;
+import org.apache.batik.gvt.renderer.*;
+import org.apache.batik.gvt.filter.*;
+import org.apache.batik.gvt.event.*;
+
+import org.w3c.dom.*;
+import org.w3c.dom.svg.*;
+import org.w3c.dom.css.*;
+import org.w3c.dom.svg.SVGLength;
+
+import org.apache.fop.svg.*;
+
+import org.w3c.dom.DOMException;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.svg.SVGAElement;
+import org.w3c.dom.svg.SVGDocument;
+import org.w3c.dom.svg.SVGSVGElement;
+
+// <!> FIXME : Those import clauses will change with new design
+import org.apache.batik.gvt.renderer.StaticRendererFactory;
+
+/**
+ * This class enables to transcode an input to an image of any format.
+ *
+ * <p>Two transcoding hints (<tt>KEY_WIDTH</tt> and
+ * <tt>KEY_HEIGHT</tt>) can be used to respectively specify the image
+ * width and the image height. If only one of these keys is specified,
+ * the transcoder preserves the aspect ratio of the original image.
+ *
+ * <p>The <tt>KEY_BACKGROUND_COLOR</tt> defines the background color
+ * to use for opaque image formats, or the background color that may
+ * be used for image formats that support alpha channel.
+ *
+ * <p>The <tt>KEY_AOI</tt> represents the area of interest to paint
+ * in device space.
+ *
+ * <p>Three additional transcoding hints that act on the SVG
+ * processor can be specified:
+ *
+ * <p><tt>KEY_LANGUAGE</tt> to set the default language to use (may be
+ * used by a <switch> SVG element for example),
+ * <tt>KEY_USER_STYLESHEET_URI</tt> to fix the URI of a user
+ * stylesheet, and <tt>KEY_PIXEL_TO_MM</tt> to specify the pixel to
+ * millimeter conversion factor.
+ *
+ * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
+ * @version $Id$
+ */
+public class PDFTranscoder extends XMLAbstractTranscoder {
+
+ /** The user agent dedicated to an <tt>ImageTranscoder</tt>. */
+ protected UserAgent userAgent = new ImageTranscoderUserAgent();
+
+ /**
+ * Constructs a new <tt>ImageTranscoder</tt>.
+ */
+ public PDFTranscoder() {
+ hints.put(KEY_DOCUMENT_ELEMENT_NAMESPACE_URI,
+ SVGConstants.SVG_NAMESPACE_URI);
+ hints.put(KEY_DOCUMENT_ELEMENT,
+ SVGConstants.SVG_SVG_TAG);
+ hints.put(KEY_DOM_IMPLEMENTATION,
+ SVGDOMImplementation.getDOMImplementation());
+ }
+
+ /**
+ * Transcodes the specified Document as an image in the specified output.
+ *
+ * @param document the document to transcode
+ * @param uri the uri of the document or null if any
+ * @param output the ouput where to transcode
+ * @exception TranscoderException if an error occured while transcoding
+ */
+ protected void transcode(Document document,
+ String uri,
+ TranscoderOutput output)
+ throws TranscoderException {
+
+ if (!(document instanceof SVGOMDocument)) {
+ throw new TranscoderException(
+ Messages.formatMessage("notsvg", null));
+ }
+ SVGDocument svgDoc = (SVGDocument)document;
+ SVGSVGElement root = svgDoc.getRootElement();
+ // initialize the SVG document with the appropriate context
+ String parserClassname = (String)hints.get(KEY_XML_PARSER_CLASSNAME);
+ DefaultSVGContext svgCtx = new DefaultSVGContext();
+ svgCtx.setPixelToMM(userAgent.getPixelToMM());
+ ((SVGOMDocument)document).setSVGContext(svgCtx);
+
+ // build the GVT tree
+ GVTBuilder builder = new GVTBuilder();
+ ImageRendererFactory rendFactory = new StaticRendererFactory();
+ GraphicsNodeRenderContext rc = getRenderContext();
+ BridgeContext ctx = new BridgeContext(userAgent, rc);
+ GraphicsNode gvtRoot;
+ try {
+ gvtRoot = builder.build(ctx, svgDoc);
+ } catch (BridgeException ex) {
+ throw new TranscoderException(ex);
+ }
+ // get the 'width' and 'height' attributes of the SVG document
+ float docWidth = (float)ctx.getDocumentSize().getWidth();
+ float docHeight = (float)ctx.getDocumentSize().getHeight();
+ ctx = null;
+ builder = null;
+
+ // compute the image's width and height according the hints
+ float imgWidth = -1;
+ if (hints.containsKey(KEY_WIDTH)) {
+ imgWidth = ((Float)hints.get(KEY_WIDTH)).floatValue();
+ }
+ float imgHeight = -1;
+ if (hints.containsKey(KEY_HEIGHT)) {
+ imgHeight = ((Float)hints.get(KEY_HEIGHT)).floatValue();
+ }
+ float width, height;
+ if (imgWidth > 0 && imgHeight > 0) {
+ width = imgWidth;
+ height = imgHeight;
+ } else if (imgHeight > 0) {
+ width = (docWidth * imgHeight) / docHeight;
+ height = imgHeight;
+ } else if (imgWidth > 0) {
+ width = imgWidth;
+ height = (docHeight * imgWidth) / docWidth;
+ } else {
+ width = docWidth;
+ height = docHeight;
+ }
+ // compute the preserveAspectRatio matrix
+ AffineTransform Px;
+ String ref = null;
+ try {
+ ref = new URL(uri).getRef();
+ } catch (MalformedURLException ex) {
+ // nothing to do, catched previously
+ }
+
+ try {
+ Px = ViewBox.getViewTransform(ref, root, width, height);
+ } catch (BridgeException ex) {
+ throw new TranscoderException(ex);
+ }
+
+ if (Px.isIdentity() && (width != docWidth || height != docHeight)) {
+ // The document has no viewBox, we need to resize it by hand.
+ // we want to keep the document size ratio
+ float d = Math.max(docWidth, docHeight);
+ float dd = Math.max(width, height);
+ float scale = dd/d;
+ Px = AffineTransform.getScaleInstance(scale, scale);
+ }
+ // take the AOI into account if any
+ if (hints.containsKey(KEY_AOI)) {
+ Rectangle2D aoi = (Rectangle2D)hints.get(KEY_AOI);
+ // transform the AOI into the image's coordinate system
+ aoi = Px.createTransformedShape(aoi).getBounds2D();
+ AffineTransform Mx = new AffineTransform();
+ double sx = width / aoi.getWidth();
+ double sy = height / aoi.getHeight();
+ Mx.scale(sx, sy);
+ double tx = -aoi.getX();
+ double ty = -aoi.getY();
+ Mx.translate(tx, ty);
+ // take the AOI transformation matrix into account
+ // we apply first the preserveAspectRatio matrix
+ Px.preConcatenate(Mx);
+ }
+ // prepare the image to be painted
+ int w = (int)width;
+ int h = (int)height;
+
+ PDFDocumentGraphics2D graphics = new PDFDocumentGraphics2D(true, output.getOutputStream(), w, h);
+ // GraphicsNodeRenderContext rc = getRenderContext();
+ graphics.setGraphicContext(new org.apache.batik.ext.awt.g2d.GraphicContext());
+ graphics.setRenderingHints(rc.getRenderingHints());
+
+ gvtRoot.paint(graphics, rc);
+
+ try {
+ graphics.finish();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new TranscoderException(ex);
+ }
+ /*
+ // paint the SVG document using the bridge package
+ // create the appropriate renderer
+ ImageRenderer renderer = rendFactory.createImageRenderer();
+ renderer.updateOffScreen(w, h);
+ renderer.setTransform(Px);
+ renderer.setTree(gvtRoot);
+ gvtRoot = null; // We're done with it...
+
+ try {
+ // now we are sure that the aoi is the image size
+ Shape raoi = new Rectangle2D.Float(0, 0, width, height);
+ // Warning: the renderer's AOI must be in user space
+ renderer.repaint(Px.createInverse().createTransformedShape(raoi));
+ BufferedImage rend = renderer.getOffScreen();
+ renderer = null; // We're done with it...
+
+ // BufferedImage dest = createImage(w, h);
+
+ //Graphics2D g2d = GraphicsUtil.createGraphics(dest);
+
+ //g2d.drawRenderedImage(rend, new AffineTransform());
+ } catch (Exception ex) {
+ throw new TranscoderException(ex);
+ }
+ */
+ }
+
+ public GraphicsNodeRenderContext getRenderContext() {
+ GraphicsNodeRenderContext nodeRenderContext = null;
+ if (nodeRenderContext == null) {
+ RenderingHints hints = new RenderingHints(null);
+ hints.put(RenderingHints.KEY_ANTIALIASING,
+ RenderingHints.VALUE_ANTIALIAS_ON);
+
+ hints.put(RenderingHints.KEY_INTERPOLATION,
+ RenderingHints.VALUE_INTERPOLATION_BILINEAR);
+
+ FontRenderContext fontRenderContext =
+ new FontRenderContext(new AffineTransform(), true, true);
+
+ TextPainter textPainter = new StrokingTextPainter();
+
+ GraphicsNodeRableFactory gnrFactory =
+ new ConcreteGraphicsNodeRableFactory();
+
+ nodeRenderContext =
+ new GraphicsNodeRenderContext(new AffineTransform(),
+ null,
+ hints,
+ fontRenderContext,
+ textPainter,
+ gnrFactory);
+ nodeRenderContext.setTextPainter(textPainter);
+ }
+
+ return nodeRenderContext;
+ }
+
+ /**
+ * Creates a <tt>DocumentFactory</tt> that is used to create an SVG DOM
+ * tree. The specified DOM Implementation is ignored and the Batik
+ * SVG DOM Implementation is automatically used.
+ *
+ * @param domImpl the DOM Implementation (not used)
+ * @param parserClassname the XML parser classname
+ */
+ protected DocumentFactory createDocumentFactory(DOMImplementation domImpl,
+ String parserClassname) {
+ return new SAXSVGDocumentFactory(parserClassname);
+ }
+
+ // --------------------------------------------------------------------
+ // UserAgent implementation
+ // --------------------------------------------------------------------
+
+ /**
+ * A user agent implementation for <tt>ImageTranscoder</tt>.
+ */
+ protected class ImageTranscoderUserAgent implements UserAgent {
+
+ /**
+ * Returns the default size of this user agent (400x400).
+ */
+ public Dimension2D getViewportSize() {
+ return new Dimension(400, 400);
+ }
+
+ /**
+ * Displays the specified error message using the <tt>ErrorHandler</tt>.
+ */
+ public void displayError(String message) {
+ try {
+ getErrorHandler().error(new TranscoderException(message));
+ } catch (TranscoderException ex) {
+ throw new RuntimeException();
+ }
+ }
+
+ /**
+ * Displays the specified error using the <tt>ErrorHandler</tt>.
+ */
+ public void displayError(Exception e) {
+ try {
+ getErrorHandler().error(new TranscoderException(e));
+ } catch (TranscoderException ex) {
+ throw new RuntimeException();
+ }
+ }
+
+ /**
+ * Displays the specified message using the <tt>ErrorHandler</tt>.
+ */
+ public void displayMessage(String message) {
+ try {
+ getErrorHandler().warning(new TranscoderException(message));
+ } catch (TranscoderException ex) {
+ throw new RuntimeException();
+ }
+ }
+
+ /**
+ * Returns the pixel to millimeter conversion factor specified in the
+ * <tt>TranscodingHints</tt> or 0.3528 if any.
+ */
+ public float getPixelToMM() {
+ if (getTranscodingHints().containsKey(KEY_PIXEL_TO_MM)) {
+ return ((Float)getTranscodingHints().get(KEY_PIXEL_TO_MM)).floatValue();
+ } else {
+ // return 0.3528f; // 72 dpi
+ return 0.26458333333333333333333333333333f; // 96dpi
+ }
+ }
+
+ /**
+ * Returns the user language specified in the
+ * <tt>TranscodingHints</tt> or "en" (english) if any.
+ */
+ public String getLanguages() {
+ if (getTranscodingHints().containsKey(KEY_LANGUAGE)) {
+ return (String)getTranscodingHints().get(KEY_LANGUAGE);
+ } else {
+ return "en";
+ }
+ }
+
+ /**
+ * Returns the user stylesheet specified in the
+ * <tt>TranscodingHints</tt> or null if any.
+ */
+ public String getUserStyleSheetURI() {
+ return (String)getTranscodingHints().get(KEY_USER_STYLESHEET_URI);
+ }
+
+ /**
+ * Returns the XML parser to use from the TranscodingHints.
+ */
+ public String getXMLParserClassName() {
+ return (String)getTranscodingHints().get(KEY_XML_PARSER_CLASSNAME);
+ }
+
+ /**
+ * Unsupported operation.
+ */
+ public EventDispatcher getEventDispatcher() {
+ return null;
+ }
+
+ /**
+ * Unsupported operation.
+ */
+ public void openLink(SVGAElement elt) { }
+
+ /**
+ * Unsupported operation.
+ */
+ public void setSVGCursor(Cursor cursor) { }
+
+ /**
+ * Unsupported operation.
+ */
+ public void runThread(Thread t) { }
+
+ /**
+ * Unsupported operation.
+ */
+ public AffineTransform getTransform() {
+ return null;
+ }
+
+ /**
+ * Unsupported operation.
+ */
+ public Point getClientAreaLocationOnScreen() {
+ return new Point();
+ }
+
+ /**
+ * Tells whether the given feature is supported by this
+ * user agent.
+ */
+ public boolean hasFeature(String s) {
+ return FEATURES.contains(s);
+ }
+
+ /**
+ * Tells whether the given extension is supported by this
+ * user agent.
+ */
+ public boolean supportExtension(String s) {
+ return false;
+ }
+ }
+
+ protected final static Set FEATURES = new HashSet();
+ static {
+ FEATURES.add(SVGConstants.SVG_ORG_W3C_SVG_FEATURE);
+ FEATURES.add(SVGConstants.SVG_ORG_W3C_SVG_LANG_FEATURE);
+ FEATURES.add(SVGConstants.SVG_ORG_W3C_SVG_STATIC_FEATURE);
+ }
+
+ // --------------------------------------------------------------------
+ // Keys definition
+ // --------------------------------------------------------------------
+
+ /**
+ * The image width key.
+ * <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1">
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Key: </TH>
+ * <TD VALIGN="TOP">KEY_WIDTH</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Value: </TH>
+ * <TD VALIGN="TOP">Float</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Default: </TH>
+ * <TD VALIGN="TOP">The width of the top most svg element</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Required: </TH>
+ * <TD VALIGN="TOP">No</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Description: </TH>
+ * <TD VALIGN="TOP">Specify the width of the image to create.</TD></TR>
+ * </TABLE> */
+ public static final TranscodingHints.Key KEY_WIDTH
+ = new LengthKey();
+
+ /**
+ * The image height key.
+ * <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1">
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Key: </TH>
+ * <TD VALIGN="TOP">KEY_HEIGHT</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Value: </TH>
+ * <TD VALIGN="TOP">Float</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Default: </TH>
+ * <TD VALIGN="TOP">The height of the top most svg element</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Required: </TH>
+ * <TD VALIGN="TOP">No</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Description: </TH>
+ * <TD VALIGN="TOP">Specify the height of the image to create.</TD></TR>
+ * </TABLE> */
+ public static final TranscodingHints.Key KEY_HEIGHT
+ = new LengthKey();
+
+ /**
+ * The area of interest key.
+ * <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1">
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Key: </TH>
+ * <TD VALIGN="TOP">KEY_AOI</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Value: </TH>
+ * <TD VALIGN="TOP">Rectangle2D</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Default: </TH>
+ * <TD VALIGN="TOP">The document's size</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Required: </TH>
+ * <TD VALIGN="TOP">No</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Description: </TH>
+ * <TD VALIGN="TOP">Specify the area of interest to render. The
+ * rectangle coordinates must be specified in pixels and in the
+ * document coordinates system.</TD></TR>
+ * </TABLE>
+ */
+ public static final TranscodingHints.Key KEY_AOI
+ = new Rectangle2DKey();
+
+ /**
+ * The language key.
+ * <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1">
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Key: </TH>
+ * <TD VALIGN="TOP">KEY_LANGUAGE</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Value: </TH>
+ * <TD VALIGN="TOP">String</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Default: </TH>
+ * <TD VALIGN="TOP">"en"</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Required: </TH>
+ * <TD VALIGN="TOP">No</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Description: </TH>
+ * <TD VALIGN="TOP">Specify the preferred language of the document.
+ * </TD></TR>
+ * </TABLE>
+ */
+ public static final TranscodingHints.Key KEY_LANGUAGE
+ = new StringKey();
+
+ /**
+ * The user stylesheet URI key.
+ * <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1">
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Key: </TH>
+ * <TD VALIGN="TOP">KEY_USER_STYLESHEET_URI</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Value: </TH>
+ * <TD VALIGN="TOP">String</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Default: </TH>
+ * <TD VALIGN="TOP">null</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Required: </TH>
+ * <TD VALIGN="TOP">No</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Description: </TH>
+ * <TD VALIGN="TOP">Specify the user style sheet.</TD></TR>
+ * </TABLE>
+ */
+ public static final TranscodingHints.Key KEY_USER_STYLESHEET_URI
+ = new StringKey();
+
+ /**
+ * The pixel to millimeter conversion factor key.
+ * <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1">
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Key: </TH>
+ * <TD VALIGN="TOP">KEY_PIXEL_TO_MM</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Value: </TH>
+ * <TD VALIGN="TOP">Float</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Default: </TH>
+ * <TD VALIGN="TOP">0.33</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Required: </TH>
+ * <TD VALIGN="TOP">No</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Description: </TH>
+ * <TD VALIGN="TOP">Specify the pixel to millimeter conversion factor.
+ * </TD></TR>
+ * </TABLE>
+ */
+ public static final TranscodingHints.Key KEY_PIXEL_TO_MM
+ = new FloatKey();
+
+ /**
+ * The image background paint key.
+ * <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1">
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Key: </TH>
+ * <TD VALIGN="TOP">KEY_BACKGROUND_COLOR</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Value: </TH>
+ * <TD VALIGN="TOP">Paint</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Default: </TH>
+ * <TD VALIGN="TOP">null</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Required: </TH>
+ * <TD VALIGN="TOP">No</TD></TR>
+ * <TR>
+ * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN="RIGHT">Description: </TH>
+ * <TD VALIGN="TOP">Specify the background color to use.
+ * The color is required by opaque image formats and is used by
+ * image formats that support alpha channel.</TD></TR>
+ * </TABLE>
+ */
+ public static final TranscodingHints.Key KEY_BACKGROUND_COLOR
+ = new PaintKey();
+
+}