Yuri Strot
9c97666620
Add public extensions to convert Macaw primitives to system CG primitives
2018-05-14 20:34:16 +07:00
Yuri Strot
23fe575a31
Merge pull request #357 from f3dm76/task/reversedDashes
...
Fix #356 : Path's stroke-dasharray is reversed
2018-05-14 19:25:44 +07:00
Yuri Strot
7c03c5d2c0
Merge pull request #355 from f3dm76/task/pathsM
...
Fix #354 : Paths with multiple M pairs are drawn incorrectly
2018-05-14 15:17:30 +07:00
Alisa Mylnikova
770f4d16bb
Fix #356 : Path's stroke-dasharray is reversed
2018-05-14 14:09:24 +07:00
Alisa Mylnikova
011d4f04a6
Fix #354 : Paths with M are drawn incorrectly
2018-05-14 13:14:36 +07:00
Alisa Mylnikova
f6faa0e291
Add tests
2018-05-11 14:29:29 +07:00
Yuri Strot
864813911c
Merge pull request #338 from f3dm76/task/fontWeight
...
Fix #337 : SVGParser: Apply font weight to custom fonts
2018-05-08 14:24:15 +07:00
Yuri Strot
07ce149849
Merge pull request #349 from f3dm76/fix/strokeOpacity
...
Fix out of bounds stroke opacity
2018-05-08 14:13:03 +07:00
Yuri Strot
d1d96a01c7
Merge pull request #343 from f3dm76/task/percentSupport
...
Task/percent support
2018-05-08 14:12:14 +07:00
Alisa Mylnikova
bd846a0dec
Change layout signature
2018-05-08 11:39:57 +07:00
Alisa Mylnikova
33284c3743
Fix out of bounds stroke opacity
2018-05-07 18:29:31 +07:00
Alisa Mylnikova
e2c4d9650d
Add NodeLayout
2018-05-07 16:14:06 +07:00
Alisa Mylnikova
f035a6c8d5
Hide SvgContentLayout
2018-05-07 15:35:48 +07:00
Alisa Mylnikova
ba9cdbc902
Perform requested changes
2018-05-07 15:26:05 +07:00
Alisa Mylnikova
68b5762a0a
Fix tspan position and color
2018-05-07 15:10:12 +07:00
Alisa Mylnikova
c27db51291
Merge branch 'master1' into swift_4.1
2018-05-07 11:55:18 +07:00
Alisa Mylnikova
a98f9e2f3a
Replace ViewBoxParams with ContentLayout
2018-05-07 11:39:38 +07:00
Alisa Mylnikova
41b31adb83
Merge branch 'master1' into task/fontWeight
...
# Conflicts:
# Source/render/RenderUtils.swift
# Source/render/TextRenderer.swift
2018-05-03 18:09:55 +07:00
Yuri Strot
495f42e864
Merge pull request #341 from f3dm76/fix/strokeWidth
...
Fix stroke-width scientific notation
2018-05-03 17:51:00 +07:00
Yuri Strot
d3db0134be
Merge pull request #340 from f3dm76/task/textAlignFix
...
Fix wrong text-anchor parsing
2018-05-03 17:50:00 +07:00
Yuri Strot
a0e2a80938
Merge pull request #336 from f3dm76/task/genericFonts
...
Fix #335 : Parse generic fonts from svg
2018-05-03 17:47:10 +07:00
Alisa Mylnikova
d749c33e78
Logic fix
2018-05-03 17:28:20 +07:00
Alisa Mylnikova
4cdec441c2
Updates for tests
2018-05-03 11:07:25 +07:00
Alisa Mylnikova
f093abc740
Fix #342 : Add percent support for svgSize
2018-04-29 15:31:46 +07:00
Alisa Mylnikova
62da85fad6
Fix stroke-width scientific notation
2018-04-28 13:29:46 +07:00
Alisa Mylnikova
f4adb557b8
MacOS adaptation
2018-04-28 13:04:13 +07:00
Alisa Mylnikova
e95a56a178
More MacOS adaptation
2018-04-28 12:50:40 +07:00
Alisa Mylnikova
9d6e0f6d41
Fix wrong text-anchor parsing
2018-04-28 11:59:17 +07:00
Alisa Mylnikova
73422282f3
Fix #337 : SVGParser: Apply font weight to custom fonts
2018-04-27 17:29:10 +07:00
Alisa Mylnikova
5c538f8c59
MacOS adaptation
2018-04-27 16:52:23 +07:00
Alisa Mylnikova
3e3bbe6d0c
Fix #335 : Parse generic fonts from svg
2018-04-27 16:42:03 +07:00
Alisa Mylnikova
4fa3ca643f
Fix #172 : Add support for fill-rule
2018-04-26 16:03:09 +07:00
Alisa Mylnikova
843cac6b6d
Parse units in font sizes (Tribute to #156 Text fixes)
2018-04-24 14:11:57 +07:00
Yuri Strot
6f83de00d1
Merge pull request #316 from f3dm76/task/rootElement
...
Add root svg element to the scene
2018-04-24 13:55:19 +07:00
Yuri Strot
7cc71365df
Merge pull request #326 from f3dm76/task/visibilityAttribute
...
Fix #325 : Attribute "visibility" is ignored
2018-04-24 13:23:27 +07:00
Alisa Mylnikova
c5d8aa90f2
Merge branch 'master' into task/rootElement
...
# Conflicts:
# Macaw.xcodeproj/project.pbxproj
2018-04-24 11:41:49 +07:00
Yuri Strot
1751d741e9
Merge pull request #324 from f3dm76/task/reverseShapeAnimation
...
Fix #323 : Reverse shape animation doesn't work
2018-04-24 00:32:54 +07:00
Alisa Mylnikova
26a3e7bee1
Merge branch 'master' into task/visibilityAttribute
...
# Conflicts:
# Source/svg/SVGParser.swift
2018-04-23 21:09:30 +07:00
Alisa Mylnikova
bc2ae5969b
Merge branch 'master' into swift_4.1
2018-04-23 21:05:52 +07:00
Yuri Strot
48504ea7e5
Merge pull request #329 from f3dm76/task/opacityRounding
...
Fix #328 : Fill opacity > 1 is processed incorrectly
2018-04-23 20:07:28 +07:00
Yuri Strot
8ce50eaba2
Merge pull request #322 from f3dm76/task/units
...
Fix #185 : Implement px m Stroke-dasharray
2018-04-23 20:04:04 +07:00
Alisa Mylnikova
6990c29802
Reverse Color changes
2018-04-23 17:45:49 +07:00
Alisa Mylnikova
02075ce0c1
Move the check to parser
2018-04-23 17:19:59 +07:00
Alisa Mylnikova
584adf861e
Add e notation parsing
2018-04-23 17:08:12 +07:00
Yuri Strot
4af9f85804
Merge pull request #293 from fdelencl42/svgParser_fix
...
fix 3 style attributes on SVGParser class
2018-04-23 16:23:42 +07:00
Yuri Strot
e4d3a0f7b4
Merge pull request #327 from f3dm76/task/strokeOffset
...
Fix #186 : Support stroke-dashoffset in SVG parser, renderer, and seri…
2018-04-23 15:24:06 +07:00
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
24d7476f37
Fix #328 : Fill opacity > 1 is processed incorrectly
2018-04-19 16:34:28 +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
0a566c11d6
Small code improvement
2018-04-19 12:07:36 +07:00
Alisa Mylnikova
b508a44987
Fix #323 : Reverse shape animation doesn't work
2018-04-19 12:04:53 +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
87b08de672
Less ? and !
2018-04-11 14:09:29 +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
Dmitry Shipinev
c78b3e9605
Merge pull request #296 from app-craft/tweak_swift_lint
...
swiftlint tweaks
2018-04-09 18:20:17 +07:00
Alisa Mylnikova
16a4c36d4a
Improve SVGView aspect scaling
2018-04-06 18:17:04 +07:00
Alisa Mylnikova
52c7740f94
Merge remote-tracking branch 'Macaw/master' into task/svgViewBox
2018-04-05 18:23:55 +07:00
Viktor Sukochev
5434930f17
Animation restorer removed
2018-04-04 22:41:27 +07:00
Sroik
cfd23c7012
swiftlint tweaks
2018-04-04 17:59:28 +03:00
Alisa Mylnikova
10996a4b82
Fix #285 : Add method to MacawView to find node at specified location
2018-04-04 14:09:53 +07: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
Yuri Strot
c09557a0ca
Merge pull request #290 from f3dm76/task/parseDefsEverywhere
...
Fix #289 : Defs section can be declared anywhere in SVG file
2018-03-29 15:12:40 +07:00
Yuri Strot
3dba88e7dd
Long tap support on macOS
2018-03-29 14:45:30 +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
Alisa Mylnikova
0a179caf9c
Fix #284 : Support Multi-tap and Long Press Gestures
2018-03-27 16:24:52 +07:00
Daniil Manin
5e2c412040
Merge branch 'master' into UIBEZIERPATH_MACOS
2018-03-19 17:20:55 +07:00
Viktor Sukochev
9e268ec05c
OS X Target compilation fix
2018-03-19 14:33:50 +07:00
Viktor Sukochev
214cbaf084
SVGParser: exponential format fix
2018-03-12 23:50:17 +07:00
Kristaps Grinbergs
be06d6cff3
macOS doesn’t have UIBezierPath
...
* Use MBezierPath to create bezier path
* AffineTransform is different for iOS and macOS
2018-02-28 17:22:25 +02:00
Viktor Sukochev
19af79615c
Animations memory leaks fixes
2018-02-12 19:27:36 +07:00
Yuri Strot
a93d4d80e9
Improve SVG arc parsing:
...
* elliptical arc support
* x-axis-rotation support
* handle invalid values according to specification
2018-02-09 21:05:56 +07:00
Viktor Sukochev
0d2a0959e7
OS X target compilation fix
2018-02-04 15:33:09 +07:00
Viktor Sukochev
461dfa869a
removeFunc layer strong reference fix
2018-01-12 23:17:21 +07:00
Viktor Sukochev
485ff989a7
ShapeLayer references fix
2018-01-12 19:53:02 +07:00
Viktor Sukochev
d358e17b4a
Combine animation leak fix
2018-01-12 17:39:02 +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
fb7663e159
Fix #258 : Quadratic path segments support
2017-12-27 17:37:52 +07:00
Yuri Strot
e67803ace3
Fix #260 : Shape with no fill and stroke still rendered with default settings
2017-12-27 17:29:11 +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
9c7ed8e68b
Fix #249 : Node Tap handler breaks after animating
2017-12-19 12:34:40 +07:00
Yuri Strot
600d99e765
Merge pull request #254 from hirschfl/swift_package_manger
...
Add support for Swift Package Manager
2017-12-18 16:45:57 +07:00
Yuri Strot
d001a4c68b
Merge pull request #248 from Lupurus/Text/text_bounds_
...
Resolve #241 : Text bounds fix
2017-12-18 16:22:21 +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
Florian Hirschmann
b050f8cf53
Added #available statement to TextRenderer
...
This needed for the Swift Package Manager to work accordingly, since it does not yet support build settings (like the deployment target).
https://lists.swift.org/pipermail/swift-evolution-announce/2017-January/000307.html
2017-12-13 14:13:52 +01:00
Yuri Strot
da01017a89
Fix formatting a little bit
2017-12-13 18:41:10 +07:00
Yuri Strot
ee652e7d87
#251 : Implement toPath() extension for Path.
2017-12-13 17:44:38 +07:00
Lupurus
1afb910548
Update Text.swift
2017-12-08 08:59:16 +01:00
Anton Marunko
0431cc29a7
Fix for filtering animations
2017-11-30 15:53:41 +07:00
Anton Marunko
072929a4b5
Remove control statements brackets
2017-11-30 15:43:55 +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
Yuri Strot
566c5482c2
Fix #217 : Set opaque for LinearGradient
2017-11-23 16:47:21 +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
de32500287
Set correct Func2D typealias name
2017-10-23 16:12:50 +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
Yuriy Kashnikov
b5bc3ef5e5
Fix path bounds for cubic curves
...
- Add 1 and 0 to solutions along to extrema they should be
considered as point for bounding box
- Refactor test harness
- Add separate tests for absolute and relative cubic bounds
2017-10-20 16:33:19 +07:00
Yuriy Kashnikov
45979a16ff
Fix cubic curve bounding box computation
2017-10-20 15:26:05 +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
b0165deebd
Add Locus to Path util functions
2017-10-18 17:46:18 +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
Yuriy Kashnikov
703ce5d3ef
Merge pull request #206 from exyte/bug/fix-skewx-skewy-in-svg-parser
...
Fix skewX and skewY in SVG parser
2017-10-17 08:48:18 +07:00
Yuriy Kashnikov
0c0ea87996
Merge pull request #202 from exyte/bug/fix-path-bounds-calculation
...
Add bounds computation via derivative
2017-10-16 22:56:28 +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