1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-09-21 09:59:10 +03:00
Commit Graph

224 Commits

Author SHA1 Message Date
Yuri Strot
e6f236de55
Merge pull request #321 from f3dm76/task/currentColor
Fix #320: Add "currentColor" support
2018-04-23 15:10:23 +07:00
Yuri Strot
38d996acf5
Merge pull request #319 from f3dm76/task/newLinesInTranform
Fix #318: Can't parse translate attributes if they contain \n
2018-04-23 15:08:03 +07:00
Yuri Strot
cdd08b2f08
Merge pull request #317 from f3dm76/task/sliceContentAlign
Apply align for slice content mode
2018-04-23 15:07:01 +07:00
Alisa Mylnikova
00410b80ea Don't serialize empty dasharray 2018-04-19 16:37:25 +07:00
Alisa Mylnikova
219b92e6de Use node's style attributes, not only group's 2018-04-19 16:14:08 +07:00
Alisa Mylnikova
e97646c53d Fix #186: Support stroke-dashoffset in SVG parser, renderer, and serializer 2018-04-19 16:00:41 +07:00
Alisa Mylnikova
0cba5aa616 Fix #325: Attribute "visibility" is ignored 2018-04-19 12:35:46 +07:00
Alisa Mylnikova
6efee3b536 Fix #185: Implement px m Stroke-dasharray 2018-04-18 18:28:21 +07:00
Alisa Mylnikova
6c0c709ced Fix #320: Add "currentColor" support 2018-04-18 17:29:28 +07:00
Alisa Mylnikova
d20f5a04d7 Fix #318: Can't parse translate attributes if they contain \n 2018-04-18 15:49:21 +07:00
Félix Delenclos
2f7dc2f44e fix conflict 2018-04-14 07:52:05 +02:00
Alisa Mylnikova
4268db024e Apply align for slice content mode 2018-04-13 11:21:47 +07:00
Alisa Mylnikova
8fb3bdc59d Add root svg element to the scene 2018-04-13 11:13:58 +07:00
Alisa Mylnikova
90c6e61a12 Fix #303: RadialGradient. Stop Offset > 1 (IOS) 2018-04-12 10:36:24 +07:00
Alisa Mylnikova
40fd1ed1e0 Merge branch 'master' into swift_4.1 2018-04-12 10:17:19 +07:00
Yuri Strot
7844137b34 Add special model class for root SVG element 2018-04-11 22:38:23 +07:00
Alisa Mylnikova
fdd5679d94 Fix #309: Style attribute "display" is being ignored 2018-04-11 17:58:21 +07:00
Yuri Strot
dd7b7904c1
Merge pull request #291 from f3dm76/task/svgViewBox
Fix #87: Support <svg> viewBox attribute
2018-04-11 16:19:48 +07:00
Alisa Mylnikova
ac071be63a Fix #306: Named colors don't work in gradients 2018-04-10 18:58:18 +07:00
Alisa Mylnikova
45dbffc1b7 Swift 4.1 adaptation 2018-04-10 11:55:36 +07:00
Alisa Mylnikova
e3cb7decd7 Code review improvements 2018-04-10 10:59:12 +07:00
Alisa Mylnikova
052003ade0 Merge commit 'c78b3e9605d1e50fed488f98214cbaff8e3808f9' into task/svgViewBox 2018-04-09 18:22:27 +07:00
Alisa Mylnikova
16a4c36d4a Improve SVGView aspect scaling 2018-04-06 18:17:04 +07:00
Sroik
cfd23c7012 swiftlint tweaks 2018-04-04 17:59:28 +03:00
Alisa Mylnikova
5cfe028494 Better aspect ratio implementation 2018-04-03 15:09:49 +07:00
Alisa Mylnikova
49e16e9f52 Better Align implementation 2018-04-03 13:17:43 +07:00
Félix Delenclos
988df59096 fix "use of unresolved identifier 'cap'" 2018-04-02 20:03:05 +02:00
Félix Delenclos
c6dbb541fa add 'round' stroke-linecap and stroke-linejoin and fixed stroke-width with decimal digits 2018-04-02 19:47:26 +02:00
Alisa Mylnikova
26ee61a2c8 Merge remote-tracking branch 'Macaw/master' into task/svgViewBox 2018-03-30 11:53:42 +07:00
Alisa Mylnikova
f70bc1b82b Use TransformHelper in SVGView 2018-03-29 18:27:58 +07:00
Alisa Mylnikova
50803e10ff Add test for viewBox 2018-03-29 17:28:05 +07:00
Yuri Strot
54a417be7d Optimize prepare phase of SVG parser and make "style" place-independent as well as "defs". 2018-03-29 16:00:39 +07:00
Alisa Mylnikova
22c77a3cf1 Add helper for aspectFill/Fit transformations 2018-03-29 15:40:08 +07:00
Alisa Mylnikova
858dfddd38 Support 'preserveAspectRatio' attribute 2018-03-29 12:02:21 +07:00
Alisa Mylnikova
3ace85105e Fix #87: Support <svg> viewBox attribute 2018-03-28 14:51:25 +07:00
Alisa Mylnikova
7177d9fe12 Fixed tests 2018-03-28 14:15:19 +07:00
Alisa Mylnikova
a59c6312cf Fix #289: Defs section can be declared anywhere in SVG file 2018-03-27 18:06:17 +07:00
Viktor Sukochev
214cbaf084 SVGParser: exponential format fix 2018-03-12 23:50:17 +07:00
Yuri Strot
931583e12c Fix #261: "D" attribute of path parsed incorrectly 2017-12-28 18:31:39 +07:00
Yuri Strot
05c91d8250 Fix #173: Implement elliptical Arc support in path SVG shape 2017-12-28 17:55:45 +07:00
Yuri Strot
3d2814ed5b Fix SVG style order issue 2017-12-20 23:18:00 +07:00
Yuri Strot
fe809749a3 Fix broken SVG tests 2017-12-20 16:36:35 +07:00
Yuri Strot
0b7c3cb978 Fix #250: Bad position of a shape's group 2017-12-20 16:13:04 +07:00
Yuri Strot
be5839ccf6 Fix #236: SVGView transparency 2017-12-20 15:46:33 +07:00
Yuri Strot
c82404f771 Fix #238: Improve gradient API and implementation.
* New API: LinearGradient(degree, stops)
* Linear gradient can be used with any degree now
* Replace var fields to let fields in all gradient classes
2017-12-13 20:18:18 +07:00
Anton Marunko
6eaf65e5ef Swift lint autocorrect fixes 2017-11-30 15:38:27 +07:00
Yuri Strot
724c28c36a
Merge pull request #232 from amarunko/bug/path-parsing
Fix for values parsing (dot separated)
2017-11-29 20:42:26 +07:00
Yuri Strot
3eed3b1949
Merge pull request #230 from amarunko/bug/path-commands
Fix for zm case in path commands
2017-11-29 20:40:42 +07:00
Anton Marunko
14d845c607 Removing not useful condition 2017-11-29 15:45:17 +07:00
Anton Marunko
6fbe4450c2 Fix for values parsing (dot separated) 2017-11-29 15:38:41 +07:00
Anton Marunko
989866b387 Characters warnings fixes 2017-11-29 14:24:00 +07:00
Anton Marunko
c99e25e755 Fix for zm case in path commands 2017-11-29 14:08:37 +07:00
Dmitry Shipinev
4bd5d79371
Merge pull request #215 from exyte/task/lint-type-name
Set correct Func2D typealias name
2017-11-22 18:42:44 +07:00
shipinev
a99882d9da Replace legacy convenience functions with Swift constructors 2017-10-23 16:03:54 +07:00
Yuriy Kashnikov
bdc3d5b562 Change Double.pi to .pi 2017-10-23 15:45:59 +07:00
Yuriy Kashnikov
2ae04afa97 Refactor locus to path implementation
- Extract locusToPath to extension of Locus
- Refactor and prettify SVG tests
2017-10-23 15:45:59 +07:00
shipinev
425a3f4b56 Lint project files 2017-10-19 15:09:09 +07:00
shipinev
7217120853 Merge branch 'master' into task/swiftlint
# Conflicts:
#	Source/animation/layer_animation/FuncBounds.swift
#	Source/animation/layer_animation/PathBounds.swift
#	Source/model/geom2d/GeomUtils.swift
#	Source/render/RenderUtils.swift
#	Source/svg/SVGParser.swift
#	Source/svg/SVGSerializer.swift
2017-10-19 15:01:09 +07:00
Victor Sukochev
27443fd43a Merge pull request #209 from exyte/feature/parse-svg-clip-path
Feature/parse svg clip path
2017-10-19 12:32:54 +07:00
Yuriy Kashnikov
9b34d18d27 Implement clip-path support in SVG parser
- Fix Locus to Path conversion: all should be counter-clockwise,
otherwise fill-rulle=nonzero will not work properly and paths
will have donut holes
- Fix Arc serialization: parse largeArc and sweep flags properly
- Add test for clip
2017-10-18 17:48:42 +07:00
Yuriy Kashnikov
8c95c8612a Fix alpha channel to SVG opacity serialization 2017-10-18 12:52:08 +07:00
Yuriy Kashnikov
2857d28b1c Fix color to SVG conversion in SVG serializer 2017-10-18 11:22:47 +07:00
shipinev
d241aee7a8 Format SVG Parser file 2017-10-16 16:38:41 +07:00
shipinev
85ec22d79c Correct and clean up SVG Parser file 2017-10-16 16:33:01 +07:00
Yuriy Kashnikov
e3d4498970 Fix skewX and skewY in SVG parser 2017-10-16 16:23:35 +07:00
shipinev
9d3a96bca4 Add SwiftLint configuration and apply autocorrection 2017-10-16 16:13:54 +07:00
Yuriy Kashnikov
32a037901f Support short rgb notation in SVG parser 2017-10-16 14:07:43 +07:00
Anton Marunko
4aec82fd10 Fix for aspect fit content mode 2017-10-12 18:50:09 +07:00
Yuriy Kashnikov
a641ea32ec Fix tests and prettify transform 2017-10-10 14:34:10 +07:00
Yuriy Kashnikov
7f58995f62 Handle baseline for text element 2017-10-10 13:59:41 +07:00
Yuriy Kashnikov
7a55066265 Implement forced placing, i.e. always do matrix transform 2017-10-09 20:43:08 +07:00
Yuriy Kashnikov
8520622b2f Fix transform and add more complex test 2017-10-09 17:27:40 +07:00
Yuriy Kashnikov
7b95e13b61 Add transform for text and image 2017-10-09 15:29:29 +07:00
Yuriy Kashnikov
b9d175f0aa Combine all defs on top of the SVG file 2017-10-09 14:47:48 +07:00
Yuriy Kashnikov
535536959a Implement straightforward clip serialization 2017-10-09 13:49:46 +07:00
Yuriy Kashnikov
9828a5b2a0 Merge pull request #190 from exyte/bug/fix-image-serialization
Fix Image to SVG serialization
2017-10-09 11:25:39 +07:00
Yuriy Kashnikov
882c19798c Add tests for SVG image serialization 2017-10-06 17:45:36 +07:00
Yuriy Kashnikov
8c6f9d777c Merge pull request #187 from exyte/bug/fix-text-parameters
Fix SVG parser for text anchor and stroke in text elements
2017-10-06 17:17:10 +07:00
Yuriy Kashnikov
a001162b8b Fix Image to SVG serialization 2017-10-06 17:12:31 +07:00
Yuriy Kashnikov
a6af6f0782 Fix relative/absolute placing for Shapes in SVG serializer 2017-10-06 12:42:27 +07:00
Yuriy Kashnikov
36d65c9365 Fix ellipse test 2017-10-06 10:13:59 +07:00
Yuriy Kashnikov
77ed4dc2bf Implement arc to SVG serialiation
For details see https://www.w3.org/TR/SVG/implnote.html#ArcImplementationNotes
2017-10-06 00:43:51 +07:00
Yuriy Kashnikov
18b579b425 Fix text constructors
- Pass text anchor
- Pass stroke
2017-10-05 11:39:30 +07:00
Anton Marunko
397628e96f Fixes for serializer optional section format 2017-10-04 11:54:14 +07:00
Yuriy Kashnikov
20d48db7ab Add grammar checks to style parser 2017-10-03 17:11:13 +07:00
Yuriy Kashnikov
5de677eefe Coerce Substring to String in parseStyle method 2017-10-03 16:58:38 +07:00
Yuriy Kashnikov
ac012dfb5b Add implementation for style classes support in SVG parser 2017-10-03 13:04:11 +07:00
Yuriy Kashnikov
2190f817ea Merge pull request #174 from exyte/feature/enhance-support-for-svg-text-attributes
Feature/enhance support for svg text attributes
2017-09-29 17:12:39 +07:00
Yuriy Kashnikov
0ec26a878f Fix stroke fill color parsing 2017-09-29 15:25:39 +07:00
Yuriy Kashnikov
b3c2469597 Resolve merge conflict for parseText method 2017-09-29 12:58:54 +07:00
Yuriy Kashnikov
cf74a919ff Remove unnecessary namespace prefix in Serializer 2017-09-22 15:46:05 +07:00
Yuriy Kashnikov
5156ceff57 Fix default baseline for Text in SVG 2017-09-21 15:57:20 +07:00
Viktor Sukochev
dac8552e82 Merge remote-tracking branch 'origin/master' into swift4 2017-09-14 15:11:16 +07:00
Victor Sukochev
dd3d1a72b7 Merge pull request #163 from exyte/feature/add-macaw-to-svg-serializer
Aadd Macaw to SVG serializer
2017-09-14 11:56:58 +07:00
Yuriy Kashnikov
d27e20e1f5 Fix review comments
- Update SVG tests: added basic test for ellipse.svg
- Handle optional params via Optional
2017-09-13 16:02:04 +03:00
Yuriy Kashnikov
524b734fc1 Improve SVG Serializer
- Support transform and placing
- Expose height and width
2017-09-13 11:54:54 +03:00
Anton Marunko
ea8b6e3f6b Warnings fixes for deprecated substring method of String class 2017-09-12 18:32:07 +07:00
Viktor Sukochev
868ab5602d Merge remote-tracking branch 'origin/master' into swift4 2017-09-12 14:59:15 +07:00
Yuriy Kashnikov
d140291208 Add 'transparent' value handling to SVG parser 2017-09-07 16:46:25 +03:00
Simon Corsin
1fb5d8246d Respecting fill color opacity for rgb and color constant. 2017-09-06 13:52:23 -04:00