adobe-research / svgObjectModelGenerator

SVG OM Generator & Writer
Apache License 2.0
49 stars 20 forks source link

OM presentation of gradients #132

Open dirkschulze opened 9 years ago

dirkschulze commented 9 years ago

The current OM representation of gradients does combine opacity and color gradients which are separate in PS. Also, the current representation does not even have midpoints. Maybe we should use the representation that Generator provides and create the final result in the svgWriter. Gradients in Ai are a subset of gradients in PS. Therefore I think this is the way to go forward.

What do you think @jhatwich @DmitryBaranovskiy ?

DmitryBaranovskiy commented 9 years ago

So, that means that if number of colour stops is different to number of opacity stops it will put intermediate values for opacity on stops?

dirkschulze commented 9 years ago

We currently add missing color stops/opacity values yes.

dirkschulze commented 9 years ago

I want to preserve PS's/Generator's gradient representation and resolved midpoints for opacity and color gradients before concatenating them into one set of color stops. Again, this would be compatible to what Illustrator does as well.

jhatwich commented 9 years ago

@dirkschulze suggestion seems good to me. I think keeping the definition compatible with Ai will be a theme for 2015!