Issue 125209 - SVG shape with gradient broken into many shapes
Summary: SVG shape with gradient broken into many shapes
Status: CONFIRMED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: 4.0.1
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-06 15:00 UTC by Ariel Constenla-Haile
Modified: 2014-07-07 10:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.2.0-dev
Developer Difficulty: ---


Attachments
SVG file with 4 shapes (1009 bytes, image/svg+xml)
2014-07-06 15:00 UTC, Ariel Constenla-Haile
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2014-07-06 15:00:05 UTC
Created attachment 83644 [details]
SVG file with 4 shapes

Insert the attached SVG file in Draw
Right-click and select Break from the context menu

In 3.4.1 you get 4 bitmaps with transparency (this says the ".uno:Context" statusbar control

In 4.* each shape is broken into multiple shapes (577 in total).

The user expectation may be to get 4 shapes with their respective gradients, as in the svg file.
Comment 1 Armin Le Grand 2014-07-07 10:01:40 UTC
SVG Gradients can be handled by primitives and are supported by all exports, but are not yet available e.g. as gradient setting for draw objects (supporting multiple color stops and other stuff). This is planned, and ODF already contains SVG gradient definitions as allowed statements.
The idea is as soon as this is available to break objects with SVG gradient fill to their simple geometry and setting the gradient as fill style. As long as this is not available there are two alternatives:

(a) Create bitmaps
(b) Create single-colored polygons clipped against the original geometry which reassemble the gradient

Both have pros and cons. The main reasons for using (b) are that it stays vector graphic and thus preserves better quality on later processings (exports). The cost is more geometry. The main disadvantages for (a) are the loss of quality and the need to 'guess' a good resolution for the bitmaps.

Thus this is best solved when we actually have SVG gradients in the core. Addendum: Currently the break still converts to metafile and then to draw objects - a direct converter from primitives to draw objects in the core is still missing and would also be needed first to avoid double work.