Skip to content

Various fixes and features (subpath, parsing, path regex, gradientTransform)#64

Open
Emasoft wants to merge 3 commits intopraeclarum:masterfrom
Emasoft:VariousFixesAndFeatures
Open

Various fixes and features (subpath, parsing, path regex, gradientTransform)#64
Emasoft wants to merge 3 commits intopraeclarum:masterfrom
Emasoft:VariousFixesAndFeatures

Conversation

@Emasoft
Copy link

@Emasoft Emasoft commented Nov 30, 2016

Various fixes and features (subpath, parsing, path regex, gradientTransform)

  • Fix to allow reading gradientTransform from inherited href link.
    Small fix: gradientTransform was ignored when the gradient was using a
    reference link to another defined gradient. This fix allows the correct
    reading of the gradientTransform also from inherited href links.

  • Added support for the transformGradient attribute that was missing
    (only Android and iOS for now)

  • Added support for the transformGradient attribute that was missing.
    Only gradients without transforms were rendered correctly before. Now
    on Android and iOS the transformGradient matrix is parsed and applied
    to the LinearGradient and to the RadialGradient. Other platforms are
    still ToDo.

  • Added a better way to split path data numbers. Some svg files were
    not parsed correctly due to some strange formatting. I added a better
    way to split path data numbers. Now it works with all numbers
    formatting. I used this regex from the SVGO project:
    @"([-+]?((\d*.\d+)|(\d+))([eE][-+]?\d+)?)"; You can test it here:
    https://regex101.com/r/9Ryu0U/1

  • Fix for the SVG SubPath Issue. Now subpaths are rendered correctly.

…nsform)

- Fix to allow reading gradientTransform from inherited href link.
Small fix: gradientTransform was ignored when the gradient was using a
reference link to another defined gradient. This fix allows the correct
reading of the gradientTransform also from inherited href links.

- Added support for the transformGradient attribute that was missing
(only Android and iOS for now)

- Added support for the transformGradient attribute that was missing.
Only gradients without transforms were rendered correctly before. Now
on Android and iOS the transformGradient matrix is parsed and applied
to the LinearGradient and to the RadialGradient. Other platforms are
still ToDo.

- Added a better way to split path data numbers. Some svg files were
not parsed correctly due to some strange formatting. I added a better
way to split path data numbers. Now it works with all numbers
formatting. I used this regex from the SVGO project:
@"([-+]?((\d*\.\d+)|(\d+))([eE][-+]?\d+)?)"; You can test it here:
https://regex101.com/r/9Ryu0U/1

- Fix for the SVG SubPath Issue. Now subpaths are rendered correctly.
@Emasoft
Copy link
Author

Emasoft commented Nov 30, 2016

@praeclarum I tried to fix the formatting this time. Now it uses tabs instead of spaces, but somehow it is still different. Now there is also a conflict that wasn't before. Feel free to fix it yourself. I don't care about credits.

@praeclarum
Copy link
Owner

Hello, I tried manually merging this but had a hard time since some of your fixes have been done in other PRs. Would you please rebase off master?

@praeclarum
Copy link
Owner

Ah never mind I see now you want me to manually merge. OK. I'll figure out a way...

@aschuhardt
Copy link

Is there any plan to merge this PR?

@praeclarum
Copy link
Owner

@aschuhardt I absolutely want these changes but can't get them merged in.

I'm worried about wiping out other people's work by blindly merging.

That said, these are great features so it just might be a risk worth taking.

@Emasoft are you at all interested on getting this rebased on master?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants