Difference between revisions of "SpecXAMLExport"

From Inkscape Wiki
Jump to navigation Jump to search
Line 6: Line 6:


== TODO ==
== TODO ==
*Implement masking and layers blend.
*Improve existing features when possible.
*More tests!


== Discussion ==
== Discussion ==
Line 11: Line 14:
== Known limitations ==
== Known limitations ==
Some SVG features are not are partially supported by XAML. When possible, a workaround has been implemented in the export filter to render the missing features. Some elements that can't be created with Inkscape are not supported.
Some SVG features are not are partially supported by XAML. When possible, a workaround has been implemented in the export filter to render the missing features. Some elements that can't be created with Inkscape are not supported.
=== Root level and groups ===
* '''[Not supported]''' Viewbox.
=== Defs ===
* '''[Partial]''' Limited support for switch (always pass).
* '''[Not supported]''' Use.
* '''[Not supported]''' Markers.
* '''[Not supported]''' Patterns.
* '''[Not supported]''' Symbols.
=== Transforms ===
* '''[Not supported]''' Multiple values rotation (only the first one is converted).
=== Filters ===
* '''[Partial]''' Support limited to blurs (and no support for horizontal/vertical only blur).
=== Gradients and color===
* '''[Partial]''' Some absolute gradients issues.
* '''[Not supported]''' CurrentColor.
* '''[Not supported]''' Fill colors with both an url and a rgb value (the first one is kept).
=== Stroke ===
* '''[Partial]''' Mitterlimit doesn't give the same result.
* '''[Partial]''' Shapes render the stroke inside (except line, polyline and polygon). Works as expected with normal paths.
=== Clip and mask ===
* '''[Partial]''' PathGeometry is positionned in the object's space (RectangleGeometry works correctly, with absolute values).
* '''[Not supported]'''
=== Text ===
* '''[Not supported]''' Text rotation.
* '''[Partial]''' Whitespace handling, issues with xml:whitespace='preserve'.
* '''[Partial]''' Text frames (only works with rectangles, and flowRegion transform not supported).
* '''[Not supported]''' Embedded fonts (in defs).
* '''[Not supported]''' Character rotation.
* '''[Not supported]''' Character positioning (x and y).
* '''[Not supported]''' Text span (from tspan or flowSpan) positioning.
* '''[Not supported]''' Text-anchor.
* '''[Not supported]''' Text stroke.
General workaround for text: convert everything to path before exporting will resolve most issues.
=== Shapes ===
* '''[Partial]'''
=== Images ===
* '''[Not supported]''' Embedded images (base64).
=== Other ===
* '''[Not supported]''' Object title and description.
* '''[Not supported]''' em, ex and % units (XAML only knows pixel values).
* '''[Not supported]''' No RDF and metadata support.
* '''[Not supported]''' DOCTYPE (crashes the XSLT conversion).


== Detailed tests ==
== Detailed tests ==
Line 73: Line 119:


=== Pserver ===
=== Pserver ===
*pservers-grad-01-b -  
Note: Absolute gradients are calculated in the calling object's space. That leads to some issues in gradient positionning, when absolute gradients are used on paths or transformed.
*pservers-grad-02-b -  
*pservers-grad-01-b - Ok.
*pservers-grad-03-b -  
*pservers-grad-02-b - Ok.
*pservers-grad-04-b -  
*pservers-grad-03-b - Patterns not supported.
*pservers-grad-05-b -  
*pservers-grad-04-b - Partial (Incorrect linear gradient angle).
*pservers-grad-06-b -  
*pservers-grad-05-b - Partial (Incorrect linear gradient angle).
*pservers-grad-07-b -  
*pservers-grad-06-b - Partial (Patterns not supported, issue with tranformed absolute gradients).
*pservers-grad-08-b -  
*pservers-grad-07-b - Gradients defined outside defs not supported.
*pservers-grad-09-b -  
*pservers-grad-08-b - Gradients defined outside defs not supported.
*pservers-grad-10-b -  
*pservers-grad-09-b - Ok.
*pservers-grad-11-b -  
*pservers-grad-10-b - Ok.
*pservers-grad-12-b -  
*pservers-grad-11-b - Partial (Absolute gradients on text issue, text stroke not supported).
*pservers-grad-13-b -> 15-b -  
*pservers-grad-12-b - Ok.
*pservers-grad-16-b -  
*pservers-grad-13-b - Very partial use support.
*pservers-grad-17-b -  
*pservers-grad-14-b - Ok.
*pservers-grad-18-b -  
*pservers-grad-15-b - Ok.
*pservers-grad-19-b -  
*pservers-grad-16-b - Partial (Last stop less than all previous stops isn't offset to 1).
*pservers-grad-17-b - Multiple values rotation not supported.
*pservers-grad-18-b - Inherit and Currentcolor not supported.
*pservers-grad-19-b - Animation, Inherit and Currentcolor not supported.


=== Render ===
=== Render ===
Line 152: Line 201:
*text-ws-02-t - Some xml:space="preserve" issues.
*text-ws-02-t - Some xml:space="preserve" issues.


=== Other tests ===
(from the scour trunk: http://bazaar.launchpad.net/~scouring/scour/trunk/files/head%3A/fulltests/)
*acid - Ok.
*appartment - Partial (Multiple fill values not supported).
*boom - Ok.
*cgmail - Partial (Incorrect position of absolute gradients).
*Degri_Energy_Saving_Lightbulb - Ok.
*dragonfly - Ok.
*gimp - Partial (Incorrect position of absolute gradients).
*git-cola-icons - Partial (Use not implemented).
*grapes - DOCTYPE (crashes the XSLT conversion). Ok after removal.
*GusEinstein_Angel - Partial (Multiple fill values not supported).
*inkscape - Partial (Incorrect position of absolute gradients).
*lightning - Partial (DOCTYPE not supported, multiple fill values not supported).
*manchester - Ok.
*News_Papers - Partial (Incorrect position of absolute gradients).
*notebook - Partial (Incorrect position of absolute gradients).
*notification-audio-next - Partial (Incorrect position of absolute gradients).
*ocal - DOCTYPE not supported, issue with svg:svg.
*oggconvert - Partial (Incorrect position of absolute gradients, maybe text position).


[[Category:Developer Documentation]]
New: Gradients and clips improvements, various minor fixes, used support removed due to XAML limitations.
[[Category:Specification]]

Revision as of 17:05, 27 January 2011

Release Note

Initial XAML released in Inkscape 0.4x.

Design

This export extension uses the XSLT extension system.

TODO

  • Implement masking and layers blend.
  • Improve existing features when possible.
  • More tests!

Discussion

Known limitations

Some SVG features are not are partially supported by XAML. When possible, a workaround has been implemented in the export filter to render the missing features. Some elements that can't be created with Inkscape are not supported.

Root level and groups

  • [Not supported] Viewbox.

Defs

  • [Partial] Limited support for switch (always pass).
  • [Not supported] Use.
  • [Not supported] Markers.
  • [Not supported] Patterns.
  • [Not supported] Symbols.

Transforms

  • [Not supported] Multiple values rotation (only the first one is converted).

Filters

  • [Partial] Support limited to blurs (and no support for horizontal/vertical only blur).

Gradients and color

  • [Partial] Some absolute gradients issues.
  • [Not supported] CurrentColor.
  • [Not supported] Fill colors with both an url and a rgb value (the first one is kept).

Stroke

  • [Partial] Mitterlimit doesn't give the same result.
  • [Partial] Shapes render the stroke inside (except line, polyline and polygon). Works as expected with normal paths.

Clip and mask

  • [Partial] PathGeometry is positionned in the object's space (RectangleGeometry works correctly, with absolute values).
  • [Not supported]

Text

  • [Not supported] Text rotation.
  • [Partial] Whitespace handling, issues with xml:whitespace='preserve'.
  • [Partial] Text frames (only works with rectangles, and flowRegion transform not supported).
  • [Not supported] Embedded fonts (in defs).
  • [Not supported] Character rotation.
  • [Not supported] Character positioning (x and y).
  • [Not supported] Text span (from tspan or flowSpan) positioning.
  • [Not supported] Text-anchor.
  • [Not supported] Text stroke.

General workaround for text: convert everything to path before exporting will resolve most issues.

Shapes

  • [Partial]

Images

  • [Not supported] Embedded images (base64).

Other

  • [Not supported] Object title and description.
  • [Not supported] em, ex and % units (XAML only knows pixel values).
  • [Not supported] No RDF and metadata support.
  • [Not supported] DOCTYPE (crashes the XSLT conversion).

Detailed tests

(from the official SVG1.1 test suite at http://www.w3.org/Graphics/SVG/WG/wiki/Test_Suite_Overview)

Colors

  • color-prop-01-b - CurrentColor value not supported.
  • color-prop-03-t - Ok.

coords

  • coords-coord-01-t - Ok.
  • coords-coord-02-t - Ok.
  • coords-trans-01-b - Ok.
  • coords-trans-02-t - Ok.
  • coords-trans-03-t - Ok.
  • coords-trans-04-t - Ok.
  • coords-trans-05-t - Ok.
  • coords-trans-06-t - Ok.
  • coords-units-01-b - Patterns not supported.
  • coords-units-02-b - % positionning not supported.
  • coords-units-03-b - em, ex and % not implemented.
  • coords-viewattr-03-b - Canvas not supported.

Filters

  • filters-gauss-01-b - Bidirectionnal blur only.

Masking

  • masking-mask-01-b -
  • masking-opacity-01-b -
  • masking-path-01-b -
  • masking-path-02-b -
  • masking-path-03-b -
  • masking-path-04-b -

Painting

  • painting-fill-01-t - Ok.
  • painting-fill-02-t - CurrentColor value not supported.
  • painting-fill-03-t - Ok (silverlight compatibility issue).
  • painting-fill-04-t - Ok.
  • painting-fill-05-b - Ok.
  • painting-render-01-b - linearRGB not supported?
  • painting-stroke-01-t - Stroke is rendered inside the object (works correctly with path)!
  • painting-stroke-02-t - Ok.
  • painting-stroke-03-t - No automatic mitter.
  • painting-stroke-04-t - Dash-array and dash-offset don't work.
  • painting-stroke-07-t - Mitter-limit doesn't work.

Path

  • paths-data-01-t - Ok.
  • paths-data-02-t - Ok.
  • paths-data-04-t - Ok.
  • paths-data-05-t - Ok.
  • paths-data-06-t - Ok.
  • paths-data-07-t - Ok.
  • paths-data-08-t - Ok.
  • paths-data-09-t - Ok.
  • paths-data-10-t - Ok.
  • paths-data-12-t - Ok.
  • paths-data-13-t - Ok.
  • paths-data-14-t - Ok.
  • paths-data-15-t - Ok.

Pserver

Note: Absolute gradients are calculated in the calling object's space. That leads to some issues in gradient positionning, when absolute gradients are used on paths or transformed.

  • pservers-grad-01-b - Ok.
  • pservers-grad-02-b - Ok.
  • pservers-grad-03-b - Patterns not supported.
  • pservers-grad-04-b - Partial (Incorrect linear gradient angle).
  • pservers-grad-05-b - Partial (Incorrect linear gradient angle).
  • pservers-grad-06-b - Partial (Patterns not supported, issue with tranformed absolute gradients).
  • pservers-grad-07-b - Gradients defined outside defs not supported.
  • pservers-grad-08-b - Gradients defined outside defs not supported.
  • pservers-grad-09-b - Ok.
  • pservers-grad-10-b - Ok.
  • pservers-grad-11-b - Partial (Absolute gradients on text issue, text stroke not supported).
  • pservers-grad-12-b - Ok.
  • pservers-grad-13-b - Very partial use support.
  • pservers-grad-14-b - Ok.
  • pservers-grad-15-b - Ok.
  • pservers-grad-16-b - Partial (Last stop less than all previous stops isn't offset to 1).
  • pservers-grad-17-b - Multiple values rotation not supported.
  • pservers-grad-18-b - Inherit and Currentcolor not supported.
  • pservers-grad-19-b - Animation, Inherit and Currentcolor not supported.

Render

  • render-elems-01-t - Ok.
  • render-elems-02-t - Ok (except !ENTITY support not implemented).
  • render-elems-03-t - Fails (!ENTITY support not implemented).
  • render-elems-06-t (and following) - Glyphs (defs) support not implemented.
  • render-groups-03-t - Glyphs fail.

Shapes

  • shapes-circle-01-t- Partial (Stroke is rendered inside the object).
  • shapes-circle-02-t - Partial (not clipped).
  • shapes-ellipse-01-t - Partial (Stroke is rendered inside the object).
  • shapes-ellipse-02-t - Partial (not clipped).
  • shapes-intro-01-t - Ok.
  • shapes-line-01-t - Ok.
  • shapes-polygon-01-t - Ok.
  • shapes-polyline-01-t - Ok.
  • shapes-rect-01-t - Partial (Stroke is rendered inside the object).
  • shapes-rect-02-t - Partial (Stroke is rendered inside the object).

Struct

Relative images don't work with kaxaml (work with okino)

  • struct-defs-01-t - Ok.
  • struct-frag-01-t - Ok.
  • struct-frag-02-t - Viewbox not correctly implemented.
  • struct-group-01-t - Ok.
  • struct-group-02-b - Ok.
  • struct-group-03-t - Doesn't work with defs in a group.
  • struct-image-01-t - Ok.
  • struct-image-04-t - Image embedding fails.
  • struct-image-06-t - PreserveRation not supported.

Text

  • text-align-01-b - Text-anchor not supported (could be hacked with StackPanel, but a bit too complex).
  • text-align-02-b - Sub and super support (no relative values).
  • text-align-03-b - Text-anchor not supported.
  • text-align-04-b - Text-anchor not supported.
  • text-align-05-b - Text-anchor and writing mode (tb-bt) not supported.
  • text-align-06-b - Text-anchor and writing mode (tb-bt) not supported.
  • text-align-08-b - Glyphs not supported
  • text-deco-01-b - Ok.
  • text-fonts-01-t - Generic fonts not supported.
  • text-fonts-02-t - Ok.
  • text-fonts-03-t - Ok.
  • text-intro-01-t - Ok (CJK fonts not tested).
  • text-intro-02-b - Direction not changed for roman characters.
  • text-intro-03-b - Writing mode not supported
  • text-intro-04-t - Ok (CJK fonts not tested).
  • text-intro-05-t - Text-anchor not supported.
  • text-path-01-b - Text on path not supported.
  • text-spacing-01-b - Letter and word spacing not supported (needs confirmation).
  • text-text-01-b - textLength and LengthAdjust not supported (needs confirmation).
  • text-text-03-b - Ok.
  • text-text-04-t to text-text-06-t - Text-anchor not supported; multiple x and y values not supported.
  • text-text-07-t - Text rotation not supported.
  • text-text-08-b - Text stroke not supported (could be implemented via Border).
  • text-tref-01-b - tref not supported.
  • text-tselect-01-b - span positioning not supported.
  • text-tspan-01-b - span positioning not supported.
  • text-ws-01-t - Ok.
  • text-ws-02-t - Some xml:space="preserve" issues.

Other tests

(from the scour trunk: http://bazaar.launchpad.net/~scouring/scour/trunk/files/head%3A/fulltests/)

  • acid - Ok.
  • appartment - Partial (Multiple fill values not supported).
  • boom - Ok.
  • cgmail - Partial (Incorrect position of absolute gradients).
  • Degri_Energy_Saving_Lightbulb - Ok.
  • dragonfly - Ok.
  • gimp - Partial (Incorrect position of absolute gradients).
  • git-cola-icons - Partial (Use not implemented).
  • grapes - DOCTYPE (crashes the XSLT conversion). Ok after removal.
  • GusEinstein_Angel - Partial (Multiple fill values not supported).
  • inkscape - Partial (Incorrect position of absolute gradients).
  • lightning - Partial (DOCTYPE not supported, multiple fill values not supported).
  • manchester - Ok.
  • News_Papers - Partial (Incorrect position of absolute gradients).
  • notebook - Partial (Incorrect position of absolute gradients).
  • notification-audio-next - Partial (Incorrect position of absolute gradients).
  • ocal - DOCTYPE not supported, issue with svg:svg.
  • oggconvert - Partial (Incorrect position of absolute gradients, maybe text position).

New: Gradients and clips improvements, various minor fixes, used support removed due to XAML limitations.