1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-08-15 16:10:39 +03:00

Merge commit '1fbc6f335b441a18dff22b851e2db429950461dc' into task/cascade-animation

This commit is contained in:
Alisa Mylnikova 2019-05-29 15:04:59 +07:00
commit 8b2027af27
43 changed files with 8339 additions and 142 deletions

View File

@ -508,6 +508,30 @@
A718CD4F1F45C28F00966E06 /* MDisplayLink_macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A718CD4B1F45C28F00966E06 /* MDisplayLink_macOS.swift */; };
A718CD501F45C28F00966E06 /* MView_macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A718CD4C1F45C28F00966E06 /* MView_macOS.swift */; };
A718CD521F45C2A400966E06 /* MBezierPath+Extension_macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A718CD511F45C2A400966E06 /* MBezierPath+Extension_macOS.swift */; };
A74C81EC229284790085A832 /* struct-use-01-t-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C81EA229284780085A832 /* struct-use-01-t-manual.reference */; };
A74C81ED229284790085A832 /* struct-use-01-t-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C81EB229284780085A832 /* struct-use-01-t-manual.svg */; };
A74C81F12292B3940085A832 /* color-prop-05-t-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C81F02292B3940085A832 /* color-prop-05-t-manual.svg */; };
A74C81F32292B45E0085A832 /* color-prop-05-t-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C81F22292B45D0085A832 /* color-prop-05-t-manual.reference */; };
A74C821F2297D4810085A832 /* coords-trans-13-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C821A2297D4800085A832 /* coords-trans-13-f-manual.svg */; };
A74C82202297D4810085A832 /* coords-trans-14-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C821B2297D4800085A832 /* coords-trans-14-f-manual.svg */; };
A74C82212297D4810085A832 /* coords-trans-11-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C821C2297D4800085A832 /* coords-trans-11-f-manual.svg */; };
A74C82222297D4810085A832 /* coords-trans-10-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C821D2297D4800085A832 /* coords-trans-10-f-manual.svg */; };
A74C82232297D4810085A832 /* coords-trans-12-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C821E2297D4810085A832 /* coords-trans-12-f-manual.svg */; };
A74C82292297D5350085A832 /* coords-trans-12-f-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C82242297D5340085A832 /* coords-trans-12-f-manual.reference */; };
A74C822A2297D5350085A832 /* coords-trans-11-f-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C82252297D5340085A832 /* coords-trans-11-f-manual.reference */; };
A74C822B2297D5350085A832 /* coords-trans-14-f-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C82262297D5340085A832 /* coords-trans-14-f-manual.reference */; };
A74C822C2297D5350085A832 /* coords-trans-10-f-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C82272297D5340085A832 /* coords-trans-10-f-manual.reference */; };
A74C822D2297D5350085A832 /* coords-trans-13-f-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C82282297D5350085A832 /* coords-trans-13-f-manual.reference */; };
A74C82322297D8B40085A832 /* shapes-rect-06-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C822E2297D8B30085A832 /* shapes-rect-06-f-manual.svg */; };
A74C82332297D8B40085A832 /* shapes-rect-02-t-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C822F2297D8B30085A832 /* shapes-rect-02-t-manual.svg */; };
A74C82342297D8B40085A832 /* shapes-rect-03-t-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C82302297D8B30085A832 /* shapes-rect-03-t-manual.svg */; };
A74C82352297D8B40085A832 /* shapes-rect-07-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C82312297D8B40085A832 /* shapes-rect-07-f-manual.svg */; };
A74C823C2297DB2C0085A832 /* shapes-rect-07-f-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C82382297DB2B0085A832 /* shapes-rect-07-f-manual.reference */; };
A74C823E2297DB2C0085A832 /* shapes-rect-03-t-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C823A2297DB2B0085A832 /* shapes-rect-03-t-manual.reference */; };
A74C823F2297DB2C0085A832 /* shapes-rect-06-f-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C823B2297DB2B0085A832 /* shapes-rect-06-f-manual.reference */; };
A74C82412297DC220085A832 /* shapes-rect-02-t-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C82402297DC220085A832 /* shapes-rect-02-t-manual.reference */; };
A74C82032296BE5F0085A832 /* paths-data-20-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C82022296BE5F0085A832 /* paths-data-20-f-manual.svg */; };
A74C82052296BFC60085A832 /* paths-data-20-f-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C82042296BFC60085A832 /* paths-data-20-f-manual.reference */; };
A7E675561EC4213500BD9ECB /* NodeBoundsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E675551EC4213500BD9ECB /* NodeBoundsTests.swift */; };
C410148E1F834D290022EE44 /* style.svg in Resources */ = {isa = PBXBuildFile; fileRef = C410148D1F834D280022EE44 /* style.svg */; };
C4153A8F1F8793DE001BA5EE /* small-logo.png in Resources */ = {isa = PBXBuildFile; fileRef = C4153A8E1F8793DD001BA5EE /* small-logo.png */; };
@ -923,6 +947,30 @@
A718CD4B1F45C28F00966E06 /* MDisplayLink_macOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MDisplayLink_macOS.swift; path = Source/platform/macOS/MDisplayLink_macOS.swift; sourceTree = SOURCE_ROOT; };
A718CD4C1F45C28F00966E06 /* MView_macOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MView_macOS.swift; path = Source/platform/macOS/MView_macOS.swift; sourceTree = SOURCE_ROOT; };
A718CD511F45C2A400966E06 /* MBezierPath+Extension_macOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "MBezierPath+Extension_macOS.swift"; path = "Source/platform/macOS/MBezierPath+Extension_macOS.swift"; sourceTree = SOURCE_ROOT; };
A74C81EA229284780085A832 /* struct-use-01-t-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "struct-use-01-t-manual.reference"; sourceTree = "<group>"; };
A74C81EB229284780085A832 /* struct-use-01-t-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "struct-use-01-t-manual.svg"; sourceTree = "<group>"; };
A74C81F02292B3940085A832 /* color-prop-05-t-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-05-t-manual.svg"; sourceTree = "<group>"; };
A74C81F22292B45D0085A832 /* color-prop-05-t-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-05-t-manual.reference"; sourceTree = "<group>"; };
A74C821A2297D4800085A832 /* coords-trans-13-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-13-f-manual.svg"; sourceTree = "<group>"; };
A74C821B2297D4800085A832 /* coords-trans-14-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-14-f-manual.svg"; sourceTree = "<group>"; };
A74C821C2297D4800085A832 /* coords-trans-11-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-11-f-manual.svg"; sourceTree = "<group>"; };
A74C821D2297D4800085A832 /* coords-trans-10-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-10-f-manual.svg"; sourceTree = "<group>"; };
A74C821E2297D4810085A832 /* coords-trans-12-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-12-f-manual.svg"; sourceTree = "<group>"; };
A74C82242297D5340085A832 /* coords-trans-12-f-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-12-f-manual.reference"; sourceTree = "<group>"; };
A74C82252297D5340085A832 /* coords-trans-11-f-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-11-f-manual.reference"; sourceTree = "<group>"; };
A74C82262297D5340085A832 /* coords-trans-14-f-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-14-f-manual.reference"; sourceTree = "<group>"; };
A74C82272297D5340085A832 /* coords-trans-10-f-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-10-f-manual.reference"; sourceTree = "<group>"; };
A74C82282297D5350085A832 /* coords-trans-13-f-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-13-f-manual.reference"; sourceTree = "<group>"; };
A74C822E2297D8B30085A832 /* shapes-rect-06-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "shapes-rect-06-f-manual.svg"; sourceTree = "<group>"; };
A74C822F2297D8B30085A832 /* shapes-rect-02-t-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "shapes-rect-02-t-manual.svg"; sourceTree = "<group>"; };
A74C82302297D8B30085A832 /* shapes-rect-03-t-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "shapes-rect-03-t-manual.svg"; sourceTree = "<group>"; };
A74C82312297D8B40085A832 /* shapes-rect-07-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "shapes-rect-07-f-manual.svg"; sourceTree = "<group>"; };
A74C82382297DB2B0085A832 /* shapes-rect-07-f-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "shapes-rect-07-f-manual.reference"; sourceTree = "<group>"; };
A74C823A2297DB2B0085A832 /* shapes-rect-03-t-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "shapes-rect-03-t-manual.reference"; sourceTree = "<group>"; };
A74C823B2297DB2B0085A832 /* shapes-rect-06-f-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "shapes-rect-06-f-manual.reference"; sourceTree = "<group>"; };
A74C82402297DC220085A832 /* shapes-rect-02-t-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "shapes-rect-02-t-manual.reference"; sourceTree = "<group>"; };
A74C82022296BE5F0085A832 /* paths-data-20-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "paths-data-20-f-manual.svg"; sourceTree = "<group>"; };
A74C82042296BFC60085A832 /* paths-data-20-f-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "paths-data-20-f-manual.reference"; sourceTree = "<group>"; };
A7E675551EC4213500BD9ECB /* NodeBoundsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NodeBoundsTests.swift; path = Bounds/NodeBoundsTests.swift; sourceTree = "<group>"; };
C410148D1F834D280022EE44 /* style.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = style.svg; sourceTree = "<group>"; };
C4153A8E1F8793DD001BA5EE /* small-logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "small-logo.png"; sourceTree = "<group>"; };
@ -1364,14 +1412,16 @@
5B1AE18320B6A669007EECCB /* w3cSVGTests */ = {
isa = PBXGroup;
children = (
421C664F2225196900DD73F5 /* color-prop-04-t-manual.svg */,
4269F43D2257265700D91393 /* color-prop-04-t-manual.reference */,
5B1AE22D20B6A669007EECCB /* color-prop-01-b-manual.reference */,
5B1AE18A20B6A669007EECCB /* color-prop-01-b-manual.svg */,
5B1AE22C20B6A669007EECCB /* color-prop-02-f-manual.reference */,
5B1AE1C620B6A669007EECCB /* color-prop-02-f-manual.svg */,
5B1AE1FA20B6A669007EECCB /* color-prop-03-t-manual.reference */,
5B1AE20320B6A669007EECCB /* color-prop-03-t-manual.svg */,
4269F43D2257265700D91393 /* color-prop-04-t-manual.reference */,
421C664F2225196900DD73F5 /* color-prop-04-t-manual.svg */,
A74C81F22292B45D0085A832 /* color-prop-05-t-manual.reference */,
A74C81F02292B3940085A832 /* color-prop-05-t-manual.svg */,
5B1AE1D420B6A669007EECCB /* coords-coord-01-t-manual.reference */,
5B1AE19A20B6A669007EECCB /* coords-coord-01-t-manual.svg */,
5B1AE1B920B6A669007EECCB /* coords-coord-02-t-manual.reference */,
@ -1394,6 +1444,16 @@
5B1AE1F220B6A669007EECCB /* coords-trans-08-t-manual.svg */,
5B1AE20720B6A669007EECCB /* coords-trans-09-t-manual.reference */,
5B1AE1E520B6A669007EECCB /* coords-trans-09-t-manual.svg */,
A74C82272297D5340085A832 /* coords-trans-10-f-manual.reference */,
A74C821D2297D4800085A832 /* coords-trans-10-f-manual.svg */,
A74C82252297D5340085A832 /* coords-trans-11-f-manual.reference */,
A74C821C2297D4800085A832 /* coords-trans-11-f-manual.svg */,
A74C82242297D5340085A832 /* coords-trans-12-f-manual.reference */,
A74C821E2297D4810085A832 /* coords-trans-12-f-manual.svg */,
A74C82282297D5350085A832 /* coords-trans-13-f-manual.reference */,
A74C821A2297D4800085A832 /* coords-trans-13-f-manual.svg */,
A74C82262297D5340085A832 /* coords-trans-14-f-manual.reference */,
A74C821B2297D4800085A832 /* coords-trans-14-f-manual.svg */,
5B1AE1CC20B6A669007EECCB /* coords-transformattr-01-f-manual.reference */,
5B1AE1E320B6A669007EECCB /* coords-transformattr-01-f-manual.svg */,
5B1AE1D020B6A669007EECCB /* coords-transformattr-02-f-manual.reference */,
@ -1482,6 +1542,8 @@
5BFEF5D420BC1C1E008DAC11 /* paths-data-18-f-manual.svg */,
5B1AE1D720B6A669007EECCB /* paths-data-19-f-manual.reference */,
5B1AE21A20B6A669007EECCB /* paths-data-19-f-manual.svg */,
A74C82022296BE5F0085A832 /* paths-data-20-f-manual.svg */,
A74C82042296BFC60085A832 /* paths-data-20-f-manual.reference */,
5B37139620BE95D7004BB6EE /* pservers-grad-01-b-manual.reference */,
5B37139220BE95D6004BB6EE /* pservers-grad-01-b-manual.svg */,
5B37139320BE95D6004BB6EE /* pservers-grad-02-b-manual.reference */,
@ -1526,10 +1588,18 @@
5B1AE1BA20B6A669007EECCB /* shapes-polyline-01-t-manual.svg */,
5B1AE1AF20B6A669007EECCB /* shapes-polyline-02-t-manual.reference */,
5B1AE1E120B6A669007EECCB /* shapes-polyline-02-t-manual.svg */,
A74C82402297DC220085A832 /* shapes-rect-02-t-manual.reference */,
A74C822F2297D8B30085A832 /* shapes-rect-02-t-manual.svg */,
A74C823A2297DB2B0085A832 /* shapes-rect-03-t-manual.reference */,
A74C82302297D8B30085A832 /* shapes-rect-03-t-manual.svg */,
5B1AE22520B6A669007EECCB /* shapes-rect-04-f-manual.reference */,
5B1AE1CE20B6A669007EECCB /* shapes-rect-04-f-manual.svg */,
5B1AE19620B6A669007EECCB /* shapes-rect-05-f-manual.reference */,
5B1AE1B720B6A669007EECCB /* shapes-rect-05-f-manual.svg */,
A74C823B2297DB2B0085A832 /* shapes-rect-06-f-manual.reference */,
A74C822E2297D8B30085A832 /* shapes-rect-06-f-manual.svg */,
A74C82382297DB2B0085A832 /* shapes-rect-07-f-manual.reference */,
A74C82312297D8B40085A832 /* shapes-rect-07-f-manual.svg */,
5B1AE22220B6A669007EECCB /* struct-defs-01-t-manual.reference */,
5B1AE22E20B6A669007EECCB /* struct-defs-01-t-manual.svg */,
5B1AE19720B6A669007EECCB /* struct-frag-01-t-manual.reference */,
@ -1544,6 +1614,8 @@
5B1AE1C420B6A669007EECCB /* struct-frag-06-t-manual.svg */,
5B1AE1CA20B6A669007EECCB /* struct-group-01-t-manual.reference */,
5B1AE22420B6A669007EECCB /* struct-group-01-t-manual.svg */,
A74C81EA229284780085A832 /* struct-use-01-t-manual.reference */,
A74C81EB229284780085A832 /* struct-use-01-t-manual.svg */,
5B1AE1BB20B6A669007EECCB /* struct-use-03-t-manual.reference */,
5B1AE20120B6A669007EECCB /* struct-use-03-t-manual.svg */,
5B1AE18D20B6A669007EECCB /* struct-use-12-f-manual.reference */,
@ -1758,10 +1830,12 @@
5BAE203C208E163D006BF277 /* triangle.reference in Resources */,
C4153A8F1F8793DE001BA5EE /* small-logo.png in Resources */,
5BAE2048208E163D006BF277 /* line.reference in Resources */,
A74C82322297D8B40085A832 /* shapes-rect-06-f-manual.svg in Resources */,
5B1AE2A420B6A669007EECCB /* paths-data-12-t-manual.reference in Resources */,
57CAB1361D7832E000FD8E47 /* triangle.svg in Resources */,
5B7E79CF20CBE69700C50BCF /* masking-path-02-b-manual.svg in Resources */,
5BFEF5D620BC1C1F008DAC11 /* paths-data-18-f-manual.svg in Resources */,
A74C81ED229284790085A832 /* struct-use-01-t-manual.svg in Resources */,
5B1AE23620B6A669007EECCB /* paths-data-07-t-manual.svg in Resources */,
5B1AE27720B6A669007EECCB /* coords-trans-03-t-manual.reference in Resources */,
5B1AE26420B6A669007EECCB /* painting-fill-03-t-manual.svg in Resources */,
@ -1769,6 +1843,7 @@
5B1AE2DA20B6A669007EECCB /* color-prop-02-f-manual.reference in Resources */,
5B1AE26620B6A669007EECCB /* painting-fill-04-t-manual.svg in Resources */,
5B3713A420BE9D8A004BB6EE /* shapes-grammar-01-f-manual.svg in Resources */,
A74C822D2297D5350085A832 /* coords-trans-13-f-manual.reference in Resources */,
5B1AE26C20B6A669007EECCB /* painting-fill-05-b-manual.svg in Resources */,
5B37139920BE95D7004BB6EE /* pservers-grad-02-b-manual.reference in Resources */,
5B1AE2D620B6A669007EECCB /* coords-trans-03-t-manual.svg in Resources */,
@ -1777,6 +1852,7 @@
5B1AE2B820B6A669007EECCB /* painting-stroke-03-t-manual.reference in Resources */,
4269F43E2257265800D91393 /* color-prop-04-t-manual.reference in Resources */,
5B1AE2C720B6A669007EECCB /* paths-data-02-t-manual.svg in Resources */,
A74C823C2297DB2C0085A832 /* shapes-rect-07-f-manual.reference in Resources */,
5B1AE27120B6A669007EECCB /* painting-stroke-04-t-manual.reference in Resources */,
5B1AE2C220B6A669007EECCB /* coords-trans-05-t-manual.svg in Resources */,
5B1AE29D20B6A669007EECCB /* types-basic-01-f-manual.reference in Resources */,
@ -1796,28 +1872,35 @@
5BAE2040208E163D006BF277 /* ellipse.reference in Resources */,
5B1AE27E20B6A669007EECCB /* coords-transformattr-02-f-manual.reference in Resources */,
5B1AE25720B6A669007EECCB /* coords-trans-07-t-manual.svg in Resources */,
A74C823F2297DB2C0085A832 /* shapes-rect-06-f-manual.reference in Resources */,
5B1AE2BC20B6A669007EECCB /* coords-coord-02-t-manual.svg in Resources */,
5B1AE23520B6A669007EECCB /* shapes-line-02-f-manual.reference in Resources */,
5B1AE2CD20B6A669007EECCB /* paths-data-10-t-manual.svg in Resources */,
5B1AE29C20B6A669007EECCB /* paths-data-01-t-manual.reference in Resources */,
5B1AE29320B6A669007EECCB /* coords-trans-09-t-manual.svg in Resources */,
5B1AE2DC20B6A669007EECCB /* struct-defs-01-t-manual.svg in Resources */,
A74C821F2297D4810085A832 /* coords-trans-13-f-manual.svg in Resources */,
A74C82052296BFC60085A832 /* paths-data-20-f-manual.reference in Resources */,
5B1AE29020B6A669007EECCB /* painting-stroke-08-t-manual.svg in Resources */,
5B1AE2A720B6A669007EECCB /* paths-data-09-t-manual.svg in Resources */,
5B1AE2AB20B6A669007EECCB /* painting-stroke-08-t-manual.reference in Resources */,
A74C82352297D8B40085A832 /* shapes-rect-07-f-manual.svg in Resources */,
5B1AE2A520B6A669007EECCB /* coords-trans-02-t-manual.reference in Resources */,
5B1AE23220B6A669007EECCB /* text-align-01-b-manual.svg in Resources */,
5B1AE2B220B6A669007EECCB /* types-basic-01-f-manual.svg in Resources */,
58944BDA20AC8A9A00657640 /* logo_base64.txt in Resources */,
5B1AE2C520B6A669007EECCB /* coords-trans-02-t-manual.svg in Resources */,
A74C81F12292B3940085A832 /* color-prop-05-t-manual.svg in Resources */,
5B1AE26120B6A669007EECCB /* paths-data-13-t-manual.reference in Resources */,
5B1AE24820B6A669007EECCB /* coords-coord-01-t-manual.svg in Resources */,
5B1AE2B620B6A669007EECCB /* paths-data-04-t-manual.svg in Resources */,
5B1AE25620B6A669007EECCB /* paths-data-05-t-manual.reference in Resources */,
5B1AE2D020B6A669007EECCB /* struct-defs-01-t-manual.reference in Resources */,
5B1AE25020B6A669007EECCB /* render-elems-01-t-manual.reference in Resources */,
A74C822C2297D5350085A832 /* coords-trans-10-f-manual.reference in Resources */,
5B1AE24520B6A669007EECCB /* struct-frag-01-t-manual.reference in Resources */,
5B1AE25B20B6A669007EECCB /* painting-stroke-01-t-manual.svg in Resources */,
A74C823E2297DB2C0085A832 /* shapes-rect-03-t-manual.reference in Resources */,
5BAE2047208E163D006BF277 /* viewBox.reference in Resources */,
5B1AE2C120B6A669007EECCB /* painting-stroke-04-t-manual.svg in Resources */,
5B1AE2BE20B6A669007EECCB /* painting-stroke-03-t-manual.svg in Resources */,
@ -1833,6 +1916,7 @@
5B1AE2B420B6A669007EECCB /* shapes-ellipse-02-t-manual.svg in Resources */,
5B1AE2A120B6A669007EECCB /* paths-data-02-t-manual.reference in Resources */,
5B37139B20BE95D7004BB6EE /* pservers-grad-07-b-manual.svg in Resources */,
A74C82212297D4810085A832 /* coords-trans-11-f-manual.svg in Resources */,
5B1AE2B920B6A669007EECCB /* painting-control-02-f-manual.svg in Resources */,
5B7E79DE20D2781A00C50BCF /* masking-intro-01-f-manual.reference in Resources */,
5B1AE28A20B6A669007EECCB /* shapes-polygon-01-t-manual.reference in Resources */,
@ -1849,11 +1933,13 @@
5B1AE2CF20B6A669007EECCB /* paths-data-07-t-manual.reference in Resources */,
5B1AE28D20B6A669007EECCB /* shapes-circle-01-t-manual.reference in Resources */,
5B1AE2A320B6A669007EECCB /* painting-fill-01-t-manual.svg in Resources */,
A74C82332297D8B40085A832 /* shapes-rect-02-t-manual.svg in Resources */,
5B1AE2CB20B6A669007EECCB /* painting-fill-02-t-manual.reference in Resources */,
5B1AE26520B6A669007EECCB /* shapes-rect-05-f-manual.svg in Resources */,
5B1AE2D120B6A669007EECCB /* paths-data-03-f-manual.reference in Resources */,
5B1AE28920B6A669007EECCB /* shapes-intro-01-t-manual.reference in Resources */,
5B1AE2C020B6A669007EECCB /* paths-data-14-t-manual.reference in Resources */,
A74C82032296BE5F0085A832 /* paths-data-20-f-manual.svg in Resources */,
5B1AE27420B6A669007EECCB /* color-prop-02-f-manual.svg in Resources */,
5B1AE25120B6A669007EECCB /* coords-trans-05-t-manual.reference in Resources */,
5B1AE29120B6A669007EECCB /* coords-transformattr-01-f-manual.svg in Resources */,
@ -1872,7 +1958,9 @@
5B1AE2D720B6A669007EECCB /* coords-trans-04-t-manual.svg in Resources */,
5B1AE2AC20B6A669007EECCB /* struct-use-12-f-manual.svg in Resources */,
5B1AE28220B6A669007EECCB /* coords-coord-01-t-manual.reference in Resources */,
A74C81F32292B45E0085A832 /* color-prop-05-t-manual.reference in Resources */,
5B1AE23420B6A669007EECCB /* painting-control-03-f-manual.reference in Resources */,
A74C82342297D8B40085A832 /* shapes-rect-03-t-manual.svg in Resources */,
5B1AE26820B6A669007EECCB /* shapes-polyline-01-t-manual.svg in Resources */,
5B1AE29A20B6A669007EECCB /* struct-frag-02-t-manual.svg in Resources */,
5B1AE2A620B6A669007EECCB /* text-fonts-01-t-manual.svg in Resources */,
@ -1885,8 +1973,10 @@
5B1AE24E20B6A669007EECCB /* paths-data-14-t-manual.svg in Resources */,
57CAB1301D7832E000FD8E47 /* group.svg in Resources */,
5B1AE28820B6A669007EECCB /* text-fonts-02-t-manual.svg in Resources */,
A74C82232297D4810085A832 /* coords-trans-12-f-manual.svg in Resources */,
5B1AE29920B6A669007EECCB /* pservers-grad-stops-01-f-manual.svg in Resources */,
5B1AE27520B6A669007EECCB /* struct-frag-04-t-manual.reference in Resources */,
A74C82292297D5350085A832 /* coords-trans-12-f-manual.reference in Resources */,
5B1AE28720B6A669007EECCB /* render-elems-03-t-manual.svg in Resources */,
5B1AE2AD20B6A669007EECCB /* painting-stroke-05-t-manual.reference in Resources */,
5B1AE25920B6A669007EECCB /* coords-trans-01-b-manual.svg in Resources */,
@ -1901,11 +1991,14 @@
5B1AE26A20B6A669007EECCB /* painting-control-06-f-manual.reference in Resources */,
C46E83551F94B20E00208037 /* transform.svg in Resources */,
5B1AE2C420B6A669007EECCB /* painting-fill-01-t-manual.reference in Resources */,
A74C82412297DC220085A832 /* shapes-rect-02-t-manual.reference in Resources */,
5B1AE2AE20B6A669007EECCB /* shapes-circle-02-t-manual.reference in Resources */,
5B1AE29520B6A669007EECCB /* shapes-ellipse-03-f-manual.reference in Resources */,
5B1AE23820B6A669007EECCB /* color-prop-01-b-manual.svg in Resources */,
A74C822A2297D5350085A832 /* coords-trans-11-f-manual.reference in Resources */,
5B1AE24620B6A669007EECCB /* painting-control-01-f-manual.svg in Resources */,
5B1AE2B120B6A669007EECCB /* color-prop-03-t-manual.svg in Resources */,
A74C81EC229284790085A832 /* struct-use-01-t-manual.reference in Resources */,
5B1AE23B20B6A669007EECCB /* struct-use-12-f-manual.reference in Resources */,
5B1AE29F20B6A669007EECCB /* painting-stroke-09-t-manual.svg in Resources */,
5B1AE27D20B6A669007EECCB /* shapes-polygon-03-t-manual.svg in Resources */,
@ -1930,11 +2023,14 @@
5B1AE2D820B6A669007EECCB /* metadata-example-01-t-manual.svg in Resources */,
5B1AE2C620B6A669007EECCB /* painting-fill-05-b-manual.reference in Resources */,
57CAB1331D7832E000FD8E47 /* polyline.svg in Resources */,
A74C822B2297D5350085A832 /* coords-trans-14-f-manual.reference in Resources */,
5B1AE2DE20B6A669007EECCB /* painting-control-03-f-manual.svg in Resources */,
5B1AE25520B6A669007EECCB /* paths-data-15-t-manual.reference in Resources */,
5B1AE24D20B6A669007EECCB /* paths-data-13-t-manual.svg in Resources */,
A74C82202297D4810085A832 /* coords-trans-14-f-manual.svg in Resources */,
5B270B5D214BBC27001AD741 /* clearColor.reference in Resources */,
57CAB1311D7832E000FD8E47 /* line.svg in Resources */,
A74C82222297D4810085A832 /* coords-trans-10-f-manual.svg in Resources */,
57B7A4DF1EE70D17009D78D7 /* logo.png in Resources */,
5B1AE24F20B6A669007EECCB /* painting-stroke-02-t-manual.reference in Resources */,
5B1AE28420B6A669007EECCB /* shapes-polyline-01-t-manual.reference in Resources */,

View File

@ -265,6 +265,10 @@ class MacawSVGTests: XCTestCase {
validateJSON("color-prop-01-b-manual")
}
func testColorProp05() {
validateJSON("color-prop-05-t-manual")
}
func testShapesEllipse01() {
validateJSON("shapes-ellipse-01-t-manual")
}
@ -277,10 +281,62 @@ class MacawSVGTests: XCTestCase {
validateJSON("paths-data-12-t-manual")
}
func testCoordsTrans01() {
validateJSON("coords-trans-01-b-manual")
}
func testCoordsTrans02() {
validateJSON("coords-trans-02-t-manual")
}
func testCoordsTrans03() {
validateJSON("coords-trans-03-t-manual")
}
func testCoordsTrans04() {
validateJSON("coords-trans-04-t-manual")
}
func testCoordsTrans05() {
validateJSON("coords-trans-05-t-manual")
}
func testCoordsTrans06() {
validateJSON("coords-trans-06-t-manual")
}
func testCoordsTrans07() {
validateJSON("coords-trans-07-t-manual")
}
func testCoordsTrans08() {
validateJSON("coords-trans-08-t-manual")
}
func testCoordsTrans09() {
validateJSON("coords-trans-09-t-manual")
}
func testCoordsTrans10() {
validateJSON("coords-trans-10-f-manual")
}
func testCoordsTrans11() {
validateJSON("coords-trans-11-f-manual")
}
func testCoordsTrans12() {
validateJSON("coords-trans-12-f-manual")
}
func testCoordsTrans13() {
validateJSON("coords-trans-13-f-manual")
}
func testCoordsTrans14() {
validateJSON("coords-trans-14-f-manual")
}
func testCoordsCoord01() {
validateJSON("coords-coord-01-t-manual")
}
@ -317,14 +373,6 @@ class MacawSVGTests: XCTestCase {
validateJSON("paths-data-06-t-manual")
}
func testCoordsTrans07() {
validateJSON("coords-trans-07-t-manual")
}
func testCoordsTrans01() {
validateJSON("coords-trans-01-b-manual")
}
func testPaintingStroke01() {
validateJSON("painting-stroke-01-t-manual")
}
@ -345,10 +393,30 @@ class MacawSVGTests: XCTestCase {
validateJSON("painting-fill-03-t-manual")
}
func testShapesRect02() {
validateJSON("shapes-rect-02-t-manual")
}
func testShapesRect03() {
validateJSON("shapes-rect-03-t-manual")
}
func testShapesRect04() {
validateJSON("shapes-rect-04-f-manual")
}
func testShapesRect05() {
validateJSON("shapes-rect-05-f-manual")
}
func testShapesRect06() {
validateJSON("shapes-rect-06-f-manual")
}
func testShapesRect07() {
validateJSON("shapes-rect-07-f-manual")
}
func testPaintingFill04() {
validateJSON("painting-fill-04-t-manual")
}
@ -389,10 +457,6 @@ class MacawSVGTests: XCTestCase {
validateJSON("painting-fill-02-t-manual")
}
func testShapesRect04() {
validateJSON("shapes-rect-04-f-manual")
}
func testCoordsTransformattr03() {
validateJSON("coords-transformattr-03-f-manual")
}
@ -421,10 +485,6 @@ class MacawSVGTests: XCTestCase {
validateJSON("coords-transformattr-01-f-manual")
}
func testCoordsTrans09() {
validateJSON("coords-trans-09-t-manual")
}
func testShapesCircle01() {
validateJSON("shapes-circle-01-t-manual")
}
@ -453,10 +513,6 @@ class MacawSVGTests: XCTestCase {
validateJSON("painting-stroke-09-t-manual")
}
func testCoordsTrans08() {
validateJSON("coords-trans-08-t-manual")
}
func testPaintingFill01() {
validateJSON("painting-fill-01-t-manual")
}
@ -473,14 +529,18 @@ class MacawSVGTests: XCTestCase {
validateJSON("struct-frag-03-t-manual")
}
func testStructUse12() {
validateJSON("struct-use-12-f-manual")
func testStructUse01() {
validateJSON("struct-use-01-t-manual")
}
func testStructUse03() {
validateJSON("struct-use-03-t-manual")
}
func testStructUse12() {
validateJSON("struct-use-12-f-manual")
}
func testColorProp03() {
validateJSON("color-prop-03-t-manual")
}
@ -505,14 +565,6 @@ class MacawSVGTests: XCTestCase {
validateJSON("coords-coord-02-t-manual")
}
func testCoordsTrans05() {
validateJSON("coords-trans-05-t-manual")
}
func testCoordsTrans02() {
validateJSON("coords-trans-02-t-manual")
}
func testPathsData02() {
validateJSON("paths-data-02-t-manual")
}
@ -521,6 +573,10 @@ class MacawSVGTests: XCTestCase {
validateJSON("paths-data-19-f-manual")
}
func testPathsData20() {
validateJSON("paths-data-20-f-manual")
}
func testStructGroup01() {
validateJSON("struct-group-01-t-manual")
}
@ -529,14 +585,6 @@ class MacawSVGTests: XCTestCase {
validateJSON("painting-stroke-05-t-manual")
}
func testCoordsTrans03() {
validateJSON("coords-trans-03-t-manual")
}
func testCoordsTrans04() {
validateJSON("coords-trans-04-t-manual")
}
func testMetadataExample01() {
validateJSON("metadata-example-01-t-manual")
}

View File

@ -10,12 +10,12 @@ There are [521 SVG tests](https://github.com/web-platform-tests/wpt/tree/master/
* [switch/object](https://www.w3.org/TR/SVG11/backward.html) (7)
The rest 306 tests can be split into following categories:
* 30.7% passed (94)
* 35.3% passed (108)
* 14.1% filters (43) [#390](https://github.com/exyte/Macaw/issues/390)
* 7.8% images (24) [wpt issue](https://github.com/web-platform-tests/wpt/issues/11178)
* 8.5% images (26) [wpt issue](https://github.com/web-platform-tests/wpt/issues/11178)
* 2.6% markers (8) [#392](https://github.com/exyte/Macaw/issues/392)
* 19.9% text (61) [#391](https://github.com/exyte/Macaw/issues/391)
* 25.2% blocked by issues (77)
* 20.6% text (63) [#391](https://github.com/exyte/Macaw/issues/391)
* 19.0% blocked by issues (58)
Status of each test:
@ -25,8 +25,8 @@ Status of each test:
|[color-prop-01-b-manual](w3cSVGTests/color-prop-01-b-manual.svg) | ✅ |
|[color-prop-02-f-manual](w3cSVGTests/color-prop-02-f-manual.svg) | ✅ |
|[color-prop-03-t-manual](w3cSVGTests/color-prop-03-t-manual.svg) | ✅ |
|[color-prop-04-t-manual](w3cSVGTests/color-prop-04-t-manual.svg) | [#387](https://github.com/exyte/Macaw/issues/387) |
|[color-prop-05-t-manual](w3cSVGTests/color-prop-05-t-manual.svg) | [#388](https://github.com/exyte/Macaw/issues/388) |
|[color-prop-04-t-manual](w3cSVGTests/color-prop-04-t-manual.svg) | |
|[color-prop-05-t-manual](w3cSVGTests/color-prop-05-t-manual.svg) | |
|[conform-viewers-02-f-manual](w3cSVGTests/conform-viewers-02-f-manual.svg) | [wpt issue](https://github.com/web-platform-tests/wpt/issues/11178) |
|[conform-viewers-03-f-manual](w3cSVGTests/conform-viewers-03-f-manual.svg) | [wpt issue](https://github.com/web-platform-tests/wpt/issues/11178) |
|[coords-coord-01-t-manual](w3cSVGTests/coords-coord-01-t-manual.svg) | ✅ |
@ -40,11 +40,11 @@ Status of each test:
|[coords-trans-07-t-manual](w3cSVGTests/coords-trans-07-t-manual.svg) | ✅ |
|[coords-trans-08-t-manual](w3cSVGTests/coords-trans-08-t-manual.svg) | ✅ |
|[coords-trans-09-t-manual](w3cSVGTests/coords-trans-09-t-manual.svg) | ✅ |
|[coords-trans-10-f-manual](w3cSVGTests/coords-trans-10-f-manual.svg) | [#347](https://github.com/exyte/Macaw/issues/347) |
|[coords-trans-11-f-manual](w3cSVGTests/coords-trans-11-f-manual.svg) | [#347](https://github.com/exyte/Macaw/issues/347) |
|[coords-trans-12-f-manual](w3cSVGTests/coords-trans-12-f-manual.svg) | [#347](https://github.com/exyte/Macaw/issues/347) |
|[coords-trans-13-f-manual](w3cSVGTests/coords-trans-13-f-manual.svg) | [#347](https://github.com/exyte/Macaw/issues/347) |
|[coords-trans-14-f-manual](w3cSVGTests/coords-trans-14-f-manual.svg) | [#347](https://github.com/exyte/Macaw/issues/347) |
|[coords-trans-10-f-manual](w3cSVGTests/coords-trans-10-f-manual.svg) | |
|[coords-trans-11-f-manual](w3cSVGTests/coords-trans-11-f-manual.svg) | ✅ |
|[coords-trans-12-f-manual](w3cSVGTests/coords-trans-12-f-manual.svg) | ✅ |
|[coords-trans-13-f-manual](w3cSVGTests/coords-trans-13-f-manual.svg) | ✅ |
|[coords-trans-14-f-manual](w3cSVGTests/coords-trans-14-f-manual.svg) | ✅ |
|[coords-transformattr-01-f-manual](w3cSVGTests/coords-transformattr-01-f-manual.svg) | ✅ |
|[coords-transformattr-02-f-manual](w3cSVGTests/coords-transformattr-02-f-manual.svg) | ✅ |
|[coords-transformattr-03-f-manual](w3cSVGTests/coords-transformattr-03-f-manual.svg) | ✅ |
@ -183,7 +183,7 @@ Status of each test:
|[paths-data-17-f-manual](w3cSVGTests/paths-data-17-f-manual.svg) | ✅ |
|[paths-data-18-f-manual](w3cSVGTests/paths-data-18-f-manual.svg) | ✅ |
|[paths-data-19-f-manual](w3cSVGTests/paths-data-19-f-manual.svg) | ✅ |
|[paths-data-20-f-manual](w3cSVGTests/paths-data-20-f-manual.svg) | [#395](https://github.com/exyte/Macaw/issues/395) |
|[paths-data-20-f-manual](w3cSVGTests/paths-data-20-f-manual.svg) | |
|[pservers-grad-01-b-manual](w3cSVGTests/pservers-grad-01-b-manual.svg) | ✅ |
|[pservers-grad-02-b-manual](w3cSVGTests/pservers-grad-02-b-manual.svg) | ✅ |
|[pservers-grad-03-b-manual](w3cSVGTests/pservers-grad-03-b-manual.svg) | ✅ |
@ -237,12 +237,12 @@ Status of each test:
|[shapes-polygon-03-t-manual](w3cSVGTests/shapes-polygon-03-t-manual.svg) | ✅ |
|[shapes-polyline-01-t-manual](w3cSVGTests/shapes-polyline-01-t-manual.svg) | ✅ |
|[shapes-polyline-02-t-manual](w3cSVGTests/shapes-polyline-02-t-manual.svg) | ✅ |
|[shapes-rect-02-t-manual](w3cSVGTests/shapes-rect-02-t-manual.svg) | [ios bug](https://stackoverflow.com/q/18880919)|
|[shapes-rect-03-t-manual](w3cSVGTests/shapes-rect-03-t-manual.svg) | [ios bug](https://stackoverflow.com/q/18880919)|
|[shapes-rect-02-t-manual](w3cSVGTests/shapes-rect-02-t-manual.svg) | |
|[shapes-rect-03-t-manual](w3cSVGTests/shapes-rect-03-t-manual.svg) | |
|[shapes-rect-04-f-manual](w3cSVGTests/shapes-rect-04-f-manual.svg) | ✅ |
|[shapes-rect-05-f-manual](w3cSVGTests/shapes-rect-05-f-manual.svg) | ✅ |
|[shapes-rect-06-f-manual](w3cSVGTests/shapes-rect-06-f-manual.svg) | [ios bug](https://stackoverflow.com/q/18880919) |
|[shapes-rect-07-f-manual](w3cSVGTests/shapes-rect-07-f-manual.svg) | [ios bug](https://stackoverflow.com/q/18880919) |
|[shapes-rect-06-f-manual](w3cSVGTests/shapes-rect-06-f-manual.svg) | |
|[shapes-rect-07-f-manual](w3cSVGTests/shapes-rect-07-f-manual.svg) | |
|[struct-defs-01-t-manual](w3cSVGTests/struct-defs-01-t-manual.svg) | ✅ |
|[struct-frag-01-t-manual](w3cSVGTests/struct-frag-01-t-manual.svg) | ✅ |
|[struct-frag-02-t-manual](w3cSVGTests/struct-frag-02-t-manual.svg) | ✅ |
@ -274,7 +274,7 @@ Status of each test:
|[struct-image-19-f-manual](w3cSVGTests/struct-image-19-f-manual.svg) | [wpt issue](https://github.com/web-platform-tests/wpt/issues/11178) |
|[struct-svg-03-f-manual](w3cSVGTests/struct-svg-03-f-manual.svg) | [#344](https://github.com/exyte/Macaw/issues/344) |
|[struct-symbol-01-b-manual](w3cSVGTests/struct-symbol-01-b-manual.svg) | [#398](https://github.com/exyte/Macaw/issues/398) |
|[struct-use-01-t-manual](w3cSVGTests/struct-use-01-t-manual.svg) | [#399](https://github.com/exyte/Macaw/issues/399) |
|[struct-use-01-t-manual](w3cSVGTests/struct-use-01-t-manual.svg) | |
|[struct-use-03-t-manual](w3cSVGTests/struct-use-03-t-manual.svg) | ✅ |
|[struct-use-09-b-manual](w3cSVGTests/struct-use-09-b-manual.svg) | [#398](https://github.com/exyte/Macaw/issues/398) |
|[struct-use-12-f-manual](w3cSVGTests/struct-use-12-f-manual.svg) | ✅ |

View File

@ -0,0 +1,88 @@
{
"contents" : [
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"h" : 150,
"type" : "Rect",
"w" : 150,
"x" : 120,
"y" : 60
},
"node" : "Shape"
}
],
"node" : "Group"
}
],
"node" : "Group"
},
{
"contents" : [
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 32,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 10, 340",
"text" : "$Revision: 1.8 $"
}
],
"node" : "Group"
},
{
"form" : {
"h" : 358,
"type" : "Rect",
"w" : 478,
"x" : 1,
"y" : 1
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
}
],
"layout" : {
"scalingMode" : "meet",
"svgSize" : {
"height" : "100.0%",
"width" : "100.0%"
},
"viewBox" : {
"h" : 360,
"type" : "Rect",
"w" : 480,
"x" : 0,
"y" : 0
},
"xAligningMode" : "mid",
"yAligningMode" : "mid"
},
"node" : "Canvas"
}

View File

@ -0,0 +1,60 @@
<svg version="1.1" baseProfile="tiny" id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= SVG 1.1 2nd Edition Test Case =-->
<!--======================================================================-->
<!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.4" reviewer="CL" author="CN" status="accepted"
version="$Revision: 1.8 $" testname="$RCSfile: color-prop-05-t.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/color.html#ColorProperty">
<p>
Tests the color that is used for the currentColor value in the fill
attribute when more than one color is specified.
</p>
<p>
This is illustrated using a single rectangle that is a child of a group
element. A fill is specified for the group element but not the
rectangle. Colour is specifed for the rectangle and the group element.
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>Run the test. No interaction required.</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>
The test is passed if the user agent renders the rectangle with a green
fill.
</p>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: color-prop-05-t.svg,v $</title>
<defs>
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<g fill="currentColor" color="lime">
<rect x="120" y="60" width="150" height="150" color="red"/>
</g>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
</g>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
<!-- comment out this watermark once the test is approved -->
<!--<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,627 @@
{
"contents" : [
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape"
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 16711680
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape"
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 40, 20"
},
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
},
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 5
}
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 40, 20"
},
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape"
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 16711680
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape"
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 40, 20"
},
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
},
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 5
}
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 40, 20"
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 0, 100"
}
],
"node" : "Group"
},
{
"contents" : [
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 32,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 10, 340",
"text" : "$Revision: 1.9 $"
}
],
"node" : "Group"
},
{
"form" : {
"h" : 358,
"type" : "Rect",
"w" : 478,
"x" : 1,
"y" : 1
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
}
],
"layout" : {
"scalingMode" : "meet",
"svgSize" : {
"height" : "100.0%",
"width" : "100.0%"
},
"viewBox" : {
"h" : 360,
"type" : "Rect",
"w" : 480,
"x" : 0,
"y" : 0
},
"xAligningMode" : "mid",
"yAligningMode" : "mid"
},
"node" : "Canvas"
}

View File

@ -0,0 +1,90 @@
<svg id="svg-root" width="100%" height="100%"
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.4" reviewer="CL" author="Microsoft" status="accepted"
version="$Revision: 1.9 $" testname="$RCSfile: coords-trans-10-f.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#EstablishingANewUserSpace">
<p>
Translation is equivalent to the matrix [1 0 0 1 tx ty], where 'tx'
and 'ty' are the distances to translate coordinates in X and Y
respectively. The test overlays a group of black graphics elements
with a 'translate' transform specified on top of an identical group
of red elements with the equivalent 'matrix' transform and vice
versa.
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>
Run the test. No interaction required.
</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>
Test passes if there is no red visible on the page.
</p>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: coords-trans-10-f.svg,v $</title>
<defs>
<font-face
font-family="SVGFreeSansASCII"
unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<g transform="translate(40 20)" fill="red">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="matrix(1 0 0 1 40 20)" fill="black" stroke="black">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="translate(0 100)">
<g transform="matrix(1 0 0 1 40 20)" fill="red">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="translate(40 20)" fill="black" stroke="black">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
</g>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none"
fill="black">$Revision: 1.9 $</text>
</g>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
<!-- comment out this watermark once the test is approved
<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,627 @@
{
"contents" : [
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape"
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 16711680
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape"
}
],
"node" : "Group",
"place" : "1.2, 0, 0, 2.5, 0, 0"
},
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
},
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 5
}
}
],
"node" : "Group",
"place" : "1.2, 0, 0, 2.5, 0, 0"
},
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape"
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 16711680
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape"
}
],
"node" : "Group",
"place" : "1.2, 0, 0, 2.5, 0, 0"
},
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
},
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 5
}
}
],
"node" : "Group",
"place" : "1.2, 0, 0, 2.5, 0, 0"
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 0, 150"
}
],
"node" : "Group"
},
{
"contents" : [
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 32,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 10, 340",
"text" : "$Revision: 1.8 $"
}
],
"node" : "Group"
},
{
"form" : {
"h" : 358,
"type" : "Rect",
"w" : 478,
"x" : 1,
"y" : 1
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
}
],
"layout" : {
"scalingMode" : "meet",
"svgSize" : {
"height" : "100.0%",
"width" : "100.0%"
},
"viewBox" : {
"h" : 360,
"type" : "Rect",
"w" : 480,
"x" : 0,
"y" : 0
},
"xAligningMode" : "mid",
"yAligningMode" : "mid"
},
"node" : "Canvas"
}

View File

@ -0,0 +1,86 @@
<svg id="svg-root" width="100%" height="100%"
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.4" reviewer="CL" author="Microsoft" status="accepted"
version="$Revision: 1.8 $" testname="$RCSfile: coords-trans-11-f.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#EstablishingANewUserSpace">
<p>
Scaling is equivalent to the matrix [sx 0 0 xy 0 0], where one unit in the X and Y directions in the new coordinate system equals 'sx' and 'sy' units in the previous coordinate system respectively.The test overlays a group of black graphics elements with a 'scale' transform specified on top of an identical group of red elements
with the equivalent 'matrix' transform and vice versa.
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>
Run the test. No interaction required.
</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>
Test passes if there is no red visible on the page.
</p>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: coords-trans-11-f.svg,v $</title>
<defs>
<font-face
font-family="SVGFreeSansASCII"
unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<g transform="scale(1.2 2.5)" fill="red">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="matrix(1.2 0 0 2.5 0 0)" fill="black" stroke="black">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="translate(0 150)">
<g transform="matrix(1.2 0 0 2.5 0 0)" fill="red">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="scale(1.2 2.5)" fill="black" stroke="black">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
</g>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none"
fill="black">$Revision: 1.8 $</text>
</g>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
<!-- comment out this watermark once the test is approved
<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,633 @@
{
"contents" : [
{
"contents" : [
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape"
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 16711680
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape"
}
],
"node" : "Group",
"place" : "0, 1, -1, 0, 0, 0"
},
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
},
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 5
}
}
],
"node" : "Group",
"place" : "0, 1, -1, 0, 0, 0"
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 200, 0"
},
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape"
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 16711680
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape"
}
],
"node" : "Group",
"place" : "0, 1, -1, 0, 0, 0"
},
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
},
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 5
}
}
],
"node" : "Group",
"place" : "0, 1, -1, 0, 0, 0"
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 310, 0"
}
],
"node" : "Group"
},
{
"contents" : [
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 32,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 10, 340",
"text" : "$Revision: 1.6 $"
}
],
"node" : "Group"
},
{
"form" : {
"h" : 358,
"type" : "Rect",
"w" : 478,
"x" : 1,
"y" : 1
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
}
],
"layout" : {
"scalingMode" : "meet",
"svgSize" : {
"height" : "100.0%",
"width" : "100.0%"
},
"viewBox" : {
"h" : 360,
"type" : "Rect",
"w" : 480,
"x" : 0,
"y" : 0
},
"xAligningMode" : "mid",
"yAligningMode" : "mid"
},
"node" : "Canvas"
}

View File

@ -0,0 +1,88 @@
<svg id="svg-root" width="100%" height="100%"
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.4" reviewer="CL" author="Microsoft" status="accepted"
version="$Revision: 1.6 $" testname="$RCSfile: coords-trans-12-f.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#EstablishingANewUserSpace">
<p>
Rotation about the origin is equivalent to the matrix [cos(a) sin(a) -sin(a) cos(a) 0 0], which has the effect of rotating the coordinate system axes by angle 'a'. The test overlays a group of black graphics elements with a 'rotate' transform specified on top of an identical group of red elements
with the equivalent 'matrix' transform and vice versa.
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>
Run the test. No interaction required.
</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>
Test passes if there is no red visible on the page.
</p>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: coords-trans-12-f.svg,v $</title>
<defs>
<font-face
font-family="SVGFreeSansASCII"
unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<g transform="translate(200)">
<g transform="rotate(90)" fill="red">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="matrix(0 1 -1 0 0 0)" fill="black" stroke="black">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
</g>
<g transform="translate(310)">
<g transform="matrix(0 1 -1 0 0 0)" fill="red">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="rotate(90)" fill="black" stroke="black">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
</g>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none"
fill="black">$Revision: 1.6 $</text>
</g>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
<!-- comment out this watermark once the test is approved
<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,627 @@
{
"contents" : [
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape"
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 16711680
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape"
}
],
"node" : "Group",
"place" : "1, 0, 1, 1, 0, 0"
},
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
},
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 5
}
}
],
"node" : "Group",
"place" : "1, 0, 1, 1, 0, 0"
},
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape"
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 16711680
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape"
}
],
"node" : "Group",
"place" : "1, 0, 1, 1, 0, 0"
},
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
},
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 5
}
}
],
"node" : "Group",
"place" : "1, 0, 1, 1, 0, 0"
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 0, 150"
}
],
"node" : "Group"
},
{
"contents" : [
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 32,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 10, 340",
"text" : "$Revision: 1.6 $"
}
],
"node" : "Group"
},
{
"form" : {
"h" : 358,
"type" : "Rect",
"w" : 478,
"x" : 1,
"y" : 1
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
}
],
"layout" : {
"scalingMode" : "meet",
"svgSize" : {
"height" : "100.0%",
"width" : "100.0%"
},
"viewBox" : {
"h" : 360,
"type" : "Rect",
"w" : 480,
"x" : 0,
"y" : 0
},
"xAligningMode" : "mid",
"yAligningMode" : "mid"
},
"node" : "Canvas"
}

View File

@ -0,0 +1,87 @@
<svg id="svg-root" width="100%" height="100%"
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.4" reviewer="CL" author="Microsoft" status="accepted"
version="$Revision: 1.6 $" testname="$RCSfile: coords-trans-13-f.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#EstablishingANewUserSpace">
<p>
A skew transformation along the x-axis is equivalent to the matrix [1 0 tan(a) 1 0 0], which has the effect of skewing X coordinates by angle 'a'.
The test overlays a group of black graphics elements with a 'skewX' transform specified on top of an identical group of red elements
with the equivalent 'matrix' transform and vice versa.
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>
Run the test. No interaction required.
</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>
Test passes if there is no red visible on the page.
</p>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: coords-trans-13-f.svg,v $</title>
<defs>
<font-face
font-family="SVGFreeSansASCII"
unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<g transform="skewX(45)" fill="red">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="matrix(1 0 1 1 0 0)" fill="black" stroke="black">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="translate(0 150)">
<g transform="matrix(1 0 1 1 0 0)" fill="red">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="skewX(45)" fill="black" stroke="black">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
</g>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none"
fill="black">$Revision: 1.6 $</text>
</g>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
<!-- comment out this watermark once the test is approved
<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,633 @@
{
"contents" : [
{
"contents" : [
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape"
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 16711680
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape"
}
],
"node" : "Group",
"place" : "1, 1, 0, 1, 0, 0"
},
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
},
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 5
}
}
],
"node" : "Group",
"place" : "1, 1, 0, 1, 0, 0"
},
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape"
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 16711680
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape"
}
],
"node" : "Group",
"place" : "1, 1, 0, 1, 0, 0"
},
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"segments" : [
{
"data" : [
20,
20
],
"type" : "M"
},
{
"data" : [
70,
20
],
"type" : "L"
},
{
"data" : [
45,
60
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"ellipse" : {
"cx" : 120,
"cy" : 35,
"rx" : 30,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 18,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 160, 40",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
},
"text" : "Filler Text"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"h" : 50,
"type" : "Rect",
"w" : 30,
"x" : 250,
"y" : 20
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"type" : "Line",
"x1" : 310,
"x2" : 350,
"y1" : 20,
"y2" : 70
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 5
}
}
],
"node" : "Group",
"place" : "1, 1, 0, 1, 0, 0"
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 0, 150"
}
],
"node" : "Group",
"place" : ".704769, -.256515, .256515, .704769, 0, 0"
}
],
"node" : "Group"
},
{
"contents" : [
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 32,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 10, 340",
"text" : "$Revision: 1.6 $"
}
],
"node" : "Group"
},
{
"form" : {
"h" : 358,
"type" : "Rect",
"w" : 478,
"x" : 1,
"y" : 1
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
}
],
"layout" : {
"scalingMode" : "meet",
"svgSize" : {
"height" : "100.0%",
"width" : "100.0%"
},
"viewBox" : {
"h" : 360,
"type" : "Rect",
"w" : 480,
"x" : 0,
"y" : 0
},
"xAligningMode" : "mid",
"yAligningMode" : "mid"
},
"node" : "Canvas"
}

View File

@ -0,0 +1,89 @@
<svg id="svg-root" width="100%" height="100%"
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.4" reviewer="CL" author="Microsoft" status="accepted"
version="$Revision: 1.6 $" testname="$RCSfile: coords-trans-14-f.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#EstablishingANewUserSpace">
<p>
A skew transformation along the y-axis is equivalent to the matrix [1 tan(a) 0 1 0 0], which has the effect of skewing Y coordinates by angle 'a'.
The test overlays a group of black graphics elements with a 'skewY' transform specified on top of an identical group of red elements
with the equivalent 'matrix' transform and vice versa.
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>
Run the test. No interaction required.
</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>
Test passes if there is no red visible on the page.
</p>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: coords-trans-14-f.svg,v $</title>
<defs>
<font-face
font-family="SVGFreeSansASCII"
unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<g transform="scale(0.75) rotate(-20)">
<g transform="skewY(45)" fill="red">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="matrix(1 1 0 1 0 0)" fill="black" stroke="black">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="translate(0 150)">
<g transform="matrix(1 1 0 1 0 0)" fill="red">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
<g transform="skewY(45)" fill="black" stroke="black">
<path d="M 20 20 L 70 20 L 45 60 z" />
<ellipse cx="120" cy="35" rx="30" ry="10" />
<text x="160" y="40">Filler Text</text>
<rect x="250" y="20" width="30" height="50" />
<line x1="310" y1="20" x2="350" y2="70" stroke-width="5" />
</g>
</g>
</g>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none"
fill="black">$Revision: 1.6 $</text>
</g>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
<!-- comment out this watermark once the test is approved
<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,793 @@
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
120,
120
],
"type" : "M"
},
{
"data" : [
25
],
"type" : "h"
},
{
"data" : [
25,
25,
0,
1,
0,
-25,
25
],
"type" : "a"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 65280
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"segments" : [
{
"data" : [
120,
120
],
"type" : "M"
},
{
"data" : [
25
],
"type" : "h"
},
{
"data" : [
25,
25,
0,
1,
0,
-25,
25
],
"type" : "a"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
200,
120
],
"type" : "M"
},
{
"data" : [
-25
],
"type" : "h"
},
{
"data" : [
25,
25,
0,
1,
1,
25,
25
],
"type" : "a"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 65280
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"segments" : [
{
"data" : [
200,
120
],
"type" : "M"
},
{
"data" : [
-25
],
"type" : "h"
},
{
"data" : [
25,
25,
0,
1,
1,
25,
25
],
"type" : "a"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"segments" : [
{
"data" : [
280,
120
],
"type" : "M"
},
{
"data" : [
25
],
"type" : "h"
},
{
"data" : [
25,
25,
0,
1,
0,
-25,
25
],
"type" : "a"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 65280
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
280,
120
],
"type" : "M"
},
{
"data" : [
25
],
"type" : "h"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"segments" : [
{
"data" : [
360,
120
],
"type" : "M"
},
{
"data" : [
-25
],
"type" : "h"
},
{
"data" : [
25,
25,
0,
1,
1,
25,
25
],
"type" : "a"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 65280
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
360,
120
],
"type" : "M"
},
{
"data" : [
-25
],
"type" : "h"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
120,
200
],
"type" : "M"
},
{
"data" : [
25
],
"type" : "h"
},
{
"data" : [
25,
25,
0,
1,
1,
-25,
-25
],
"type" : "a"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 65280
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"segments" : [
{
"data" : [
120,
200
],
"type" : "M"
},
{
"data" : [
25
],
"type" : "h"
},
{
"data" : [
25,
25,
0,
1,
1,
-25,
-25
],
"type" : "a"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"segments" : [
{
"data" : [
200,
200
],
"type" : "M"
},
{
"data" : [
-25
],
"type" : "h"
},
{
"data" : [
25,
25,
0,
1,
0,
25,
-25
],
"type" : "a"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 65280
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
200,
200
],
"type" : "M"
},
{
"data" : [
-25
],
"type" : "h"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"segments" : [
{
"data" : [
280,
200
],
"type" : "M"
},
{
"data" : [
25
],
"type" : "h"
},
{
"data" : [
25,
25,
0,
1,
1,
-25,
-25
],
"type" : "a"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 65280
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
280,
200
],
"type" : "M"
},
{
"data" : [
25
],
"type" : "h"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"segments" : [
{
"data" : [
360,
200
],
"type" : "M"
},
{
"data" : [
-25
],
"type" : "h"
},
{
"data" : [
25,
25,
0,
1,
0,
25,
-25
],
"type" : "a"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 65280
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"segments" : [
{
"data" : [
360,
200
],
"type" : "M"
},
{
"data" : [
-25
],
"type" : "h"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape"
}
],
"node" : "Group"
},
{
"contents" : [
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 32,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 10, 340",
"text" : "$Revision: 1.3 $"
}
],
"node" : "Group"
},
{
"form" : {
"h" : 358,
"type" : "Rect",
"w" : 478,
"x" : 1,
"y" : 1
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
}
],
"layout" : {
"scalingMode" : "meet",
"svgSize" : {
"height" : "100.0%",
"width" : "100.0%"
},
"viewBox" : {
"h" : 360,
"type" : "Rect",
"w" : 480,
"x" : 0,
"y" : 0
},
"xAligningMode" : "mid",
"yAligningMode" : "mid"
},
"node" : "Canvas"
}

View File

@ -0,0 +1,87 @@
<svg id="svg-root" width="100%" height="100%"
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.4" reviewer="CL" author="ED" status="accepted"
version="$Revision: 1.3 $" testname="$RCSfile: paths-data-20-f.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/paths.html#PathDataEllipticalArcCommands">
<p>
Tests parsing of the elliptical arc path syntax.
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>
Run the test. No interaction required.
</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>
The test has passed if the image looks as if there are eight green circles that have
two white rectangles overlapping them, like in the reference image. If any red is visible
the test has failed.
</p>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: paths-data-20-f.svg,v $</title>
<defs>
<font-face
font-family="SVGFreeSansASCII"
unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<!-- no commawsp between arc flags -->
<path d="M120,120 h25 a25,25 0 1,0 -25,25 z" fill="red" stroke="lime"/>
<path d="M120,120 h25 a25,25 0 10 -25,25z" fill="lime"/>
<!-- no commawsp between arc flags and no commawsp after arc flags -->
<path d="M200,120 h-25 a25,25 0 1,1 25,25 z" fill="red" stroke="lime"/>
<path d="M200,120 h-25 a25,25 0 1125,25 z" fill="lime"/>
<!-- out of range large-arc-flag value -->
<path d="M280,120 h25 a25,25 0 1,0 -25,25 z" fill="lime" stroke="lime"/>
<path d="M280,120 h25 a25,25 0 6 0 -25,25 z" fill="red"/>
<!-- negative sweep-flag value -->
<path d="M360,120 h-25 a25,25 0 1,1 25,25 z" fill="lime" stroke="lime"/>
<path d="M360,120 h-25 a25,25 0 1 -1 25,25 z" fill="red"/>
<!-- no commawsp between sweep-flag and following coordinate-pair -->
<path d="M120,200 h25 a25,25 0 1,1 -25,-25 z" fill="red" stroke="lime"/>
<path d="M120,200 h25 a25,25 0 1 1-25,-25 z" fill="lime"/>
<!-- no commawsp before arc flags -->
<path d="M200,200 h-25 a25,25 0 1,0 25,-25 z" fill="lime" stroke="lime"/>
<path d="M200,200 h-25 a25,2501 025,-25 z" fill="red"/>
<!-- out of range sweep-flag value -->
<path d="M280,200 h25 a25,25 0 1,1 -25,-25 z" fill="lime" stroke="lime"/>
<path d="M280,200 h25 a25 25 0 1 7 -25 -25 z" fill="red"/>
<!-- negative large-arc-flag value -->
<path d="M360,200 h-25 a25,25 0 1,0 25,-25 z" fill="lime" stroke="lime"/>
<path d="M360,200 h-25 a25,25 0 -1 0 25,-25 z" fill="red"/>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none"
fill="black">$Revision: 1.3 $</text>
</g>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
<!-- comment out this watermark once the test is approved
<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g> -->
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -0,0 +1,188 @@
{
"contents" : [
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 32768
},
"form" : {
"h" : 80,
"type" : "Rect",
"w" : 50,
"x" : 0,
"y" : 46
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 32768
},
"form" : {
"h" : 80,
"type" : "Rect",
"w" : 50,
"x" : 130,
"y" : 0
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 32768
},
"form" : {
"rect" : {
"h" : 80,
"type" : "Rect",
"w" : 50,
"x" : 30,
"y" : 196
},
"rx" : 20,
"ry" : 20,
"type" : "RoundRect"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
},
{
"fill" : {
"type" : "Color",
"val" : 32768
},
"form" : {
"rect" : {
"h" : 80,
"type" : "Rect",
"w" : 50,
"x" : 130,
"y" : 196
},
"rx" : 20,
"ry" : 20,
"type" : "RoundRect"
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
}
],
"node" : "Group"
}
],
"node" : "Group"
},
{
"contents" : [
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 32,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 10, 340",
"text" : "$Revision: 1.5 $"
}
],
"node" : "Group"
},
{
"form" : {
"h" : 358,
"type" : "Rect",
"w" : 478,
"x" : 1,
"y" : 1
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
}
],
"layout" : {
"scalingMode" : "meet",
"svgSize" : {
"height" : "100.0%",
"width" : "100.0%"
},
"viewBox" : {
"h" : 360,
"type" : "Rect",
"w" : 480,
"x" : 0,
"y" : 0
},
"xAligningMode" : "mid",
"yAligningMode" : "mid"
},
"node" : "Canvas"
}

View File

@ -0,0 +1,71 @@
<svg version="1.1" baseProfile="tiny" id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= SVG 1.1 2nd Edition Test Case =-->
<!--======================================================================-->
<!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.4" reviewer="DJ" author="CN" status="accepted"
version="$Revision: 1.5 $" testname="$RCSfile: shapes-rect-02-t.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/shapes.html#RectElement">
<p>
Test x, y, width, height, rx and ry default/lacuna values on a rect element.
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>
Run the test. No interaction required.
</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>
There should be four green rectangles visible, two of them should have rounded corners.
</p>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: shapes-rect-02-t.svg,v $</title>
<defs>
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<g fill="green" stroke="#000000">
<!-- Set x coordinate to default. -->
<rect y="46" width="50" height="80"/>
<!-- Set y coordinate to default. -->
<rect x="130" width="50" height="80"/>
<!-- Set width to default. -->
<rect x="250" y="46" height="80" width="0"/>
<!-- Set height to default. -->
<rect x="350" y="46" height="0" width="50"/>
<!-- Set rx to default. -->
<rect x="30" y="196" width="50" height="80" ry="20"/>
<!-- Set ry to default. -->
<rect x="130" y="196" width="50" height="80" rx="20"/>
</g>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
</g>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
<!-- comment out this watermark once the test is approved -->
<!--<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,139 @@
<svg id="svg-root" width="100%" height="100%"
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.4" reviewer="CM" author="ED" status="accepted"
version="$Revision: 1.9 $" testname="$RCSfile: shapes-rect-03-t.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/shapes.html#RectElement">
<p>
Tests rx and ry clamping and aliasing.
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>
Run the test. No interaction required.
</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>
The test has passed if:
</p>
<ul>
<li>There is no red visible</li>
<li>There is no green outside the black borders of each rectangle</li>
</ul>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: shapes-rect-03-t.svg,v $</title>
<defs>
<font-face
font-family="SVGFreeSansASCII"
unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<g transform="translate(0, 30)">
<g fill="red">
<g id="references">
<rect x="100" width="20" height="100" rx="50" ry="20"/>
<rect x="130" width="20" height="100" rx="10" ry="20"/>
<rect x="160" width="20" height="100" rx="10" ry="20"/>
<rect x="190" width="20" height="100" rx="10" ry="50"/>
<rect x="220" width="20" height="100" rx="10" ry="20"/>
<rect x="250" width="20" height="100" rx="10" ry="10"/>
<rect x="280" width="20" height="100" rx="5" ry="5"/>
<rect x="310" width="20" height="100" rx="0" ry="0"/>
<rect x="340" width="20" height="100" rx="0" ry="0"/>
<g transform="translate(45,0)">
<rect x="10" y="120" width="100" height="20" rx="50" ry="10"/>
<rect x="10" y="150" width="100" height="20" rx="15" ry="10"/>
<rect x="10" y="180" width="100" height="20" rx="10" ry="10"/>
<rect x="130" y="120" width="100" height="20" rx="50" ry="10"/>
<rect x="130" y="150" width="100" height="20" rx="20" ry="10"/>
<rect x="130" y="180" width="100" height="20" rx="10" ry="10"/>
<rect x="250" y="120" width="100" height="20" rx="5" ry="5"/>
<rect x="250" y="150" width="100" height="20" rx="0" ry="0"/>
<rect x="250" y="180" width="100" height="20" rx="0" ry="0"/>
</g>
<g transform="translate(100,100)">
<rect x="10" y="120" width="50" height="20" rx="25" ry="10"/>
<rect x="80" y="120" width="20" height="50" rx="10" ry="25"/>
<rect x="120" y="120" width="50" height="20" rx="25" ry="10"/>
<rect stroke-width="0.5" width="20" height="30" rx="10" ry="15" transform="translate(-10 -15) scale(2) translate(10 15) translate(85 52.5)"/>
<rect x="230" y="120" width="20" height="30" rx="10" ry="25"/>
</g>
</g>
</g>
<g id="tests" fill="lime">
<rect x="100" width="20" height="100" rx="50" ry="20"/>
<rect x="130" width="20" height="100" rx="15" ry="20"/>
<rect x="160" width="20" height="100" rx="10" ry="20"/>
<rect x="190" width="20" height="100" rx="80"/>
<rect x="220" width="20" height="100" rx="20"/>
<rect x="250" width="20" height="100" rx="10"/>
<rect x="280" width="20" height="100" rx="5"/>
<rect x="310" width="20" height="100" rx="0"/>
<rect x="340" width="20" height="100" rx="0" ry="0"/>
<g transform="translate(45,0)">
<rect x="10" y="120" width="100" height="20" rx="50" ry="20"/>
<rect x="10" y="150" width="100" height="20" rx="15" ry="20"/>
<rect x="10" y="180" width="100" height="20" rx="10" ry="20"/>
<rect x="130" y="120" width="100" height="20" ry="50"/>
<rect x="130" y="150" width="100" height="20" ry="20"/>
<rect x="130" y="180" width="100" height="20" ry="10"/>
<rect x="250" y="120" width="100" height="20" ry="5"/>
<rect x="250" y="150" width="100" height="20" ry="0"/>
<rect x="250" y="180" width="100" height="20" rx="0" ry="0"/>
</g>
<g transform="translate(100,100)">
<rect x="10" y="120" width="50" height="20" rx="50"/>
<rect x="80" y="120" width="20" height="50" ry="50"/>
<rect x="120" y="120" width="50" height="20" rx="200" ry="200"/>
<rect width="20" height="30" rx="50" transform="translate(-10 -15) scale(2) translate(10 15) translate(85 52.5)"/>
<rect x="230" y="120" width="20" height="30" ry="50"/>
</g>
</g>
<use xlink:href="#references" fill="none" stroke="black"/>
</g>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none"
fill="black">$Revision: 1.9 $</text>
</g>
<rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
<!-- comment out this watermark once the test is approved
<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -0,0 +1,221 @@
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"rect" : {
"h" : 100,
"type" : "Rect",
"w" : 200,
"x" : 25,
"y" : 50
},
"rx" : 100,
"ry" : 50,
"type" : "RoundRect"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"rect" : {
"h" : 100,
"type" : "Rect",
"w" : 200,
"x" : 25,
"y" : 50
},
"rx" : 150,
"ry" : 50,
"type" : "RoundRect"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"rect" : {
"h" : 100,
"type" : "Rect",
"w" : 200,
"x" : 25,
"y" : 200
},
"rx" : 150,
"ry" : 50,
"type" : "RoundRect"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"rect" : {
"h" : 100,
"type" : "Rect",
"w" : 200,
"x" : 25,
"y" : 200
},
"rx" : 100,
"ry" : 50,
"type" : "RoundRect"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"rect" : {
"h" : 100,
"type" : "Rect",
"w" : 200,
"x" : 275,
"y" : 50
},
"rx" : 100,
"ry" : 50,
"type" : "RoundRect"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"rect" : {
"h" : 100,
"type" : "Rect",
"w" : 200,
"x" : 275,
"y" : 50
},
"rx" : 100,
"ry" : 75,
"type" : "RoundRect"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"rect" : {
"h" : 100,
"type" : "Rect",
"w" : 200,
"x" : 275,
"y" : 200
},
"rx" : 100,
"ry" : 75,
"type" : "RoundRect"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"rect" : {
"h" : 100,
"type" : "Rect",
"w" : 200,
"x" : 275,
"y" : 200
},
"rx" : 100,
"ry" : 50,
"type" : "RoundRect"
},
"node" : "Shape"
}
],
"node" : "Group"
},
{
"contents" : [
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 32,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 10, 340",
"text" : "$Revision: 1.3 $"
}
],
"node" : "Group"
},
{
"form" : {
"h" : 358,
"type" : "Rect",
"w" : 478,
"x" : 1,
"y" : 1
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
}
],
"layout" : {
"scalingMode" : "meet",
"svgSize" : {
"height" : "100.0%",
"width" : "100.0%"
},
"viewBox" : {
"h" : 360,
"type" : "Rect",
"w" : 480,
"x" : 0,
"y" : 0
},
"xAligningMode" : "mid",
"yAligningMode" : "mid"
},
"node" : "Canvas"
}

View File

@ -0,0 +1,70 @@
<svg id="svg-root" width="100%" height="100%"
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.4" reviewer="CL" author="Microsoft" status="accepted"
version="$Revision: 1.3 $" testname="$RCSfile: shapes-rect-06-f.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/shapes.html#RectElement">
<p>
When 'rect' attributes 'rx' and 'ry' have a value greater than half of the width/height of the rectangle, they are treated as half the width/height of the rectangle.
</p>
<p>
The test creates one 'rect' element with 'rx' greater than 1/2 the 'rect' width. Underneath that element, it creates a red 'rect' element with
'rx' set to 1/2 the width. Repeats with 'ry' attribute.
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>
Run the test. No interaction required.
</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>
Test passes if there is no red visible on the page.
</p>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: shapes-rect-06-f.svg,v $</title>
<defs>
<font-face
font-family="SVGFreeSansASCII"
unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<rect x="25" y="50" width="200" height="100" rx="100" ry="50" fill="red" />
<rect x="25" y="50" width="200" height="100" rx="150" ry="50" fill="black" />
<rect x="25" y="200" width="200" height="100" rx="150" ry="50" fill="red" />
<rect x="25" y="200" width="200" height="100" rx="100" ry="50" fill="black" />
<rect x="275" y="50" width="200" height="100" ry="50" rx="100" fill="red" />
<rect x="275" y="50" width="200" height="100" ry="75" rx="100" fill="black" />
<rect x="275" y="200" width="200" height="100" ry="75" rx="100" fill="red" />
<rect x="275" y="200" width="200" height="100" ry="50" rx="100" fill="black" />
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none"
fill="black">$Revision: 1.3 $</text>
</g>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
<!-- comment out this watermark once the test is approved -->
<!--
<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>
-->
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,145 @@
{
"contents" : [
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"rect" : {
"h" : 100,
"type" : "Rect",
"w" : 200,
"x" : 25,
"y" : 50
},
"rx" : 100,
"ry" : 100,
"type" : "RoundRect"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"rect" : {
"h" : 100,
"type" : "Rect",
"w" : 200,
"x" : 25,
"y" : 50
},
"rx" : 100,
"ry" : 50,
"type" : "RoundRect"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 16711680
},
"form" : {
"rect" : {
"h" : 100,
"type" : "Rect",
"w" : 200,
"x" : 25,
"y" : 200
},
"rx" : 100,
"ry" : 50,
"type" : "RoundRect"
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"rect" : {
"h" : 100,
"type" : "Rect",
"w" : 200,
"x" : 25,
"y" : 200
},
"rx" : 100,
"ry" : 100,
"type" : "RoundRect"
},
"node" : "Shape"
}
],
"node" : "Group"
},
{
"contents" : [
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 32,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 10, 340",
"text" : "$Revision: 1.2 $"
}
],
"node" : "Group"
},
{
"form" : {
"h" : 358,
"type" : "Rect",
"w" : 478,
"x" : 1,
"y" : 1
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
}
],
"layout" : {
"scalingMode" : "meet",
"svgSize" : {
"height" : "100.0%",
"width" : "100.0%"
},
"viewBox" : {
"h" : 360,
"type" : "Rect",
"w" : 480,
"x" : 0,
"y" : 0
},
"xAligningMode" : "mid",
"yAligningMode" : "mid"
},
"node" : "Canvas"
}

View File

@ -0,0 +1,61 @@
<svg id="svg-root" width="100%" height="100%"
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.4" reviewer="CL" author="Microsoft" status="accepted"
version="$Revision: 1.2 $" testname="$RCSfile: shapes-rect-07-f.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/shapes.html#RectElement">
<p>
Checks that unspecified 'ry' and 'rx' attributes are copied from each other before their values are clamped.
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>
Run the test. No interaction required.
</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>
Test passes if there is no red visible on the page.
</p>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: shapes-rect-07-f.svg,v $</title>
<defs>
<font-face
font-family="SVGFreeSansASCII"
unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<rect x="25" y="50" width="200" height="100" rx="100" fill="red" />
<rect x="25" y="50" width="200" height="100" rx="100" ry="50" fill="black" />
<rect x="25" y="200" width="200" height="100" rx="100" ry="50" fill="red" />
<rect x="25" y="200" width="200" height="100" rx="100" fill="black" />
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none"
fill="black">$Revision: 1.2 $</text>
</g>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
<!-- comment out this watermark once the test is approved -->
<!--
<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>
-->
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,503 @@
{
"contents" : [
{
"contents" : [
{
"contents" : [
{
"contents" : [
{
"align" : "max",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 20,
"weight" : "normal"
},
"node" : "Text",
"text" : "<rect>"
},
{
"align" : "max",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 20,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 0, 30",
"text" : "<circle>"
},
{
"align" : "max",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 20,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 0, 60",
"text" : "<ellipse>"
},
{
"align" : "max",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 20,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 0, 90",
"text" : "<line>"
},
{
"align" : "max",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 20,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 0, 120",
"text" : "<polyline>"
},
{
"align" : "max",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 20,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 0, 150",
"text" : "<polygon>"
},
{
"align" : "max",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 20,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 0, 180",
"text" : "<path>"
},
{
"align" : "max",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 20,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 0, 210",
"text" : "<image>"
},
{
"align" : "max",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 20,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 0, 240",
"text" : "<text>"
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 130, 40"
},
{
"contents" : [
{
"align" : "max",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 20,
"weight" : "normal"
},
"node" : "Text",
"text" : "<g>"
},
{
"align" : "max",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 20,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 0, 30",
"text" : "<use>"
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 310, 40"
}
],
"node" : "Group"
},
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"h" : 20,
"type" : "Rect",
"w" : 20,
"x" : 0,
"y" : 0
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"cx" : 10,
"cy" : 10,
"r" : 10,
"type" : "Circle"
},
"node" : "Shape",
"place" : "1, 0, 0, 1, 0, 30"
},
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"ellipse" : {
"cx" : 10,
"cy" : 10,
"rx" : 10,
"ry" : 10,
"type" : "Ellipse"
},
"extent" : 6.2831853071795862,
"shift" : 0,
"type" : "Arc"
},
"node" : "Shape",
"place" : "1, 0, 0, 1, 0, 60"
},
{
"fill" : {
"type" : "Color",
"val" : 0
},
"form" : {
"type" : "Line",
"x1" : 0,
"x2" : 20,
"y1" : 10,
"y2" : 10
},
"node" : "Shape",
"place" : "1, 0, 0, 1, 0, 90",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 65280
},
"join" : "miter",
"width" : 2
}
},
{
"form" : {
"points" : [
0,
0,
20,
0,
20,
20
],
"type" : "Polyline"
},
"node" : "Shape",
"place" : "1, 0, 0, 1, 0, 120",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 65280
},
"join" : "miter",
"width" : 2
}
},
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"points" : [
0,
0,
20,
0,
20,
20,
0,
20,
0,
0
],
"type" : "Polygon"
},
"node" : "Shape",
"place" : "1, 0, 0, 1, 0, 150"
},
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"segments" : [
{
"data" : [
0,
0
],
"type" : "M"
},
{
"data" : [
20,
0
],
"type" : "L"
},
{
"data" : [
20,
20
],
"type" : "L"
},
{
"data" : [
0,
20
],
"type" : "L"
},
{
"data" : [
],
"type" : "z"
}
],
"type" : "Path"
},
"node" : "Shape",
"place" : "1, 0, 0, 1, 0, 180"
},
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 65280
},
"font" : {
"name" : "FreeSerif,serif",
"size" : 25,
"weight" : "bold"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 0, 260",
"text" : "Text"
},
{
"contents" : [
{
"fill" : {
"type" : "Color",
"val" : 65280
},
"form" : {
"h" : 20,
"type" : "Rect",
"w" : 10,
"x" : 0,
"y" : 0
},
"node" : "Shape"
},
{
"fill" : {
"type" : "Color",
"val" : 32768
},
"form" : {
"h" : 20,
"type" : "Rect",
"w" : 10,
"x" : 10,
"y" : 0
},
"node" : "Shape"
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 180, 0"
},
{
"fill" : {
"type" : "Color",
"val" : 52224
},
"form" : {
"h" : 20,
"type" : "Rect",
"w" : 20,
"x" : 0,
"y" : 0
},
"node" : "Shape",
"place" : "1, 0, 0, 1, 180, 30"
}
],
"node" : "Group",
"place" : "1, 0, 0, 1, 150, 25"
}
],
"node" : "Group"
},
{
"contents" : [
{
"align" : "min",
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 32,
"weight" : "normal"
},
"node" : "Text",
"place" : "1, 0, 0, 1, 10, 340",
"text" : "$Revision: 1.5 $"
}
],
"node" : "Group"
},
{
"form" : {
"h" : 358,
"type" : "Rect",
"w" : 478,
"x" : 1,
"y" : 1
},
"node" : "Shape",
"stroke" : {
"cap" : "butt",
"dashes" : [
],
"fill" : {
"type" : "Color",
"val" : 0
},
"join" : "miter",
"width" : 1
}
}
],
"layout" : {
"scalingMode" : "meet",
"svgSize" : {
"height" : "100.0%",
"width" : "100.0%"
},
"viewBox" : {
"h" : 360,
"type" : "Rect",
"w" : 480,
"x" : 0,
"y" : 0
},
"xAligningMode" : "mid",
"yAligningMode" : "mid"
},
"node" : "Canvas"
}

View File

@ -0,0 +1,111 @@
<svg version="1.1" baseProfile="tiny" id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= SVG 1.1 2nd Edition Test Case =-->
<!--======================================================================-->
<!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.4" reviewer="CN" author="VH" status="accepted"
version="$Revision: 1.5 $" testname="$RCSfile: struct-use-01-t.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/struct.html#UseElement">
<p>
The purpose of this test is to validate proper handling of
the use element. In particular, the test checks the proper inheritance
of properties through the shadow tree (rather than through the document
tree).
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>
Run the test. No interaction required.
</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>
The test should display various elements in different shades of green.
If an element is not displayed in green, but in red fill and/or yellow
stroke, then it is in error.
</p>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: struct-use-01-t.svg,v $</title>
<defs>
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<defs>
<font-face font-family="FreeSerif" unicode-range="U+0020-U+00FF">
<font-face-src>
<font-face-uri xlink:href="../resources/FreeSerifBoldItalic.svg#FreeSerifBoldItalic"/>
</font-face-src>
</font-face>
<g fill="red" stroke="yellow" stroke-width="3">
<rect id="usedRect" width="20" height="20"/>
<circle id="usedCircle" cx="10" cy="10" r="10"/>
<ellipse id="usedEllipse" cx="10" cy="10" rx="10" ry="10"/>
<line id="usedLine" x1="0" y1="10" x2="20" y2="10"/>
<path id="usedPath" d="M 0 0 L 20 0 L 20 20 L 0 20 Z"/>
<polygon id="usedPolygon" points="0,0 20,0 20,20 0,20 0 0"/>
<polyline id="usedPolyline" points="0,0 20,0 20,20"/>
<g id="usedG">
<rect width="10" height="20"/>
<rect x="10" width="10" height="20" fill="rgb(0,128,0)"/>
</g>
<use id="usedUse" xlink:href="#usedRect"/>
<image id="usedImage" xlink:href="../images/20x20.png" width="20" height="20"/>
<text id="usedText">Text</text>
</g>
</defs>
<g>
<g id="labels" transform="translate(130, 40)" font-size="20" text-anchor="end">
<text>&lt;rect&gt;</text>
<text y="30">&lt;circle&gt;</text>
<text y="60">&lt;ellipse&gt;</text>
<text y="90">&lt;line&gt;</text>
<text y="120">&lt;polyline&gt;</text>
<text y="150">&lt;polygon&gt;</text>
<text y="180">&lt;path&gt;</text>
<text y="210">&lt;image&gt;</text>
<text y="240">&lt;text&gt;</text>
</g>
<g id="labelsColumn2" transform="translate(310, 40)" font-size="20" text-anchor="end">
<text>&lt;g&gt;</text>
<text y="30">&lt;use&gt;</text>
</g>
</g>
<g transform="translate(150, 25)">
<use xlink:href="#usedRect" fill="#0F0"/>
<use y="30" xlink:href="#usedCircle" fill="#0F0"/>
<use y="60" xlink:href="#usedEllipse" fill="#0F0"/>
<use y="90" xlink:href="#usedLine" stroke="#0F0" stroke-width="2"/>
<use y="120" xlink:href="#usedPolyline" stroke="#0F0" stroke-width="2" fill="none"/>
<use y="150" xlink:href="#usedPolygon" fill="#0F0"/>
<use y="180" xlink:href="#usedPath" fill="#0F0"/>
<use y="210" xlink:href="#usedImage" fill="#FF0"/>
<use y="260" xlink:href="#usedText" fill="#0F0" font-weight="bold" font-size="25" font-style="italic" font-family="FreeSerif,serif"/>
<use x="180" y="0" xlink:href="#usedG" fill="#0F0"/>
<use x="180" y="30" xlink:href="#usedUse" fill="#0c0"/>
</g>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
</g>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
<!-- comment out this watermark once the test is approved -->
<!--<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -2,23 +2,153 @@ open class Color: Fill {
public let val: Int
public static let white: Color = Color( val: 0xFFFFFF )
public static let silver: Color = Color( val: 0xC0C0C0 )
public static let gray: Color = Color( val: 0x808080 )
public static let black: Color = Color( val: 0 )
public static let red: Color = Color( val: 0xFF0000 )
public static let maroon: Color = Color( val: 0x800000 )
public static let yellow: Color = Color( val: 0xFFFF00 )
public static let olive: Color = Color( val: 0x808000 )
public static let lime: Color = Color( val: 0x00FF00 )
public static let green: Color = Color( val: 0x008000 )
public static let aqua: Color = Color( val: 0x00FFFF )
public static let teal: Color = Color( val: 0x008080 )
public static let blue: Color = Color( val: 0x0000FF )
public static let navy: Color = Color( val: 0x000080 )
public static let fuchsia: Color = Color( val: 0xFF00FF )
public static let purple: Color = Color( val: 0x800080 )
public static let clear: Color = Color.rgba(r: 0, g: 0, b: 0, a: 0)
public static let white = Color(0xFFFFFF)
public static let silver = Color(0xC0C0C0)
public static let gray = Color(0x808080)
public static let black = Color(0)
public static let red = Color(0xFF0000)
public static let maroon = Color(0x800000)
public static let yellow = Color(0xFFFF00)
public static let olive = Color(0x808000)
public static let lime = Color(0x00FF00)
public static let green = Color(0x008000)
public static let aqua = Color(0x00FFFF)
public static let teal = Color(0x008080)
public static let blue = Color(0x0000FF)
public static let navy = Color(0x000080)
public static let fuchsia = Color(0xFF00FF)
public static let purple = Color(0x800080)
public static let clear = Color.rgba(r: 0, g: 0, b: 0, a: 0)
public static let aliceBlue = Color(0xf0f8ff)
public static let antiqueWhite = Color(0xfaebd7)
public static let aquamarine = Color(0x7fffd4)
public static let azure = Color(0xf0ffff)
public static let beige = Color(0xf5f5dc)
public static let bisque = Color(0xffe4c4)
public static let blanchedAlmond = Color(0xffebcd)
public static let blueViolet = Color(0x8a2be2)
public static let brown = Color(0xa52a2a)
public static let burlywood = Color(0xdeb887)
public static let cadetBlue = Color(0x5f9ea0)
public static let chartreuse = Color(0x7fff00)
public static let chocolate = Color(0xd2691e)
public static let coral = Color(0xff7f50)
public static let cornflowerBlue = Color(0x6495ed)
public static let cornsilk = Color(0xfff8dc)
public static let crimson = Color(0xdc143c)
public static let cyan = Color(0x00ffff)
public static let darkBlue = Color(0x00008b)
public static let darkCyan = Color(0x008b8b)
public static let darkGoldenrod = Color(0xb8860b)
public static let darkGray = Color(0xa9a9a9)
public static let darkGreen = Color(0x006400)
public static let darkKhaki = Color(0xbdb76b)
public static let darkMagenta = Color(0x8b008b)
public static let darkOliveGreen = Color(0x556b2f)
public static let darkOrange = Color(0xff8c00)
public static let darkOrchid = Color(0x9932cc)
public static let darkRed = Color(0x8b0000)
public static let darkSalmon = Color(0xe9967a)
public static let darkSeaGreen = Color(0x8fbc8f)
public static let darkSlateBlue = Color(0x483d8b)
public static let darkSlateGray = Color(0x2f4f4f)
public static let darkTurquoise = Color(0x00ced1)
public static let darkViolet = Color(0x9400d3)
public static let deepPink = Color(0xff1493)
public static let deepSkyBlue = Color(0x00bfff)
public static let dimGray = Color(0x696969)
public static let dodgerBlue = Color(0x1e90ff)
public static let firebrick = Color(0xb22222)
public static let floralWhite = Color(0xfffaf0)
public static let forestGreen = Color(0x228b22)
public static let gainsboro = Color(0xdcdcdc)
public static let ghostWhite = Color(0xf8f8ff)
public static let gold = Color(0xffd700)
public static let goldenrod = Color(0xdaa520)
public static let greenYellow = Color(0xadff2f)
public static let honeydew = Color(0xf0fff0)
public static let hotPink = Color(0xff69b4)
public static let indianRed = Color(0xcd5c5c)
public static let indigo = Color(0x4b0082)
public static let ivory = Color(0xfffff0)
public static let khaki = Color(0xf0e68c)
public static let lavender = Color(0xe6e6fa)
public static let lavenderBlush = Color(0xfff0f5)
public static let lawnGreen = Color(0x7cfc00)
public static let lemonChiffon = Color(0xfffacd)
public static let lightBlue = Color(0xadd8e6)
public static let lightCoral = Color(0xf08080)
public static let lightCyan = Color(0xe0ffff)
public static let lightGoldenrodYellow = Color(0xfafad2)
public static let lightGray = Color(0xd3d3d3)
public static let lightGreen = Color(0x90ee90)
public static let lightPink = Color(0xffb6c1)
public static let lightSalmon = Color(0xffa07a)
public static let lightSeaGreen = Color(0x20b2aa)
public static let lightSkyBlue = Color(0x87cefa)
public static let lightSlateGray = Color(0x778899)
public static let lightSteelBlue = Color(0xb0c4de)
public static let lightYellow = Color(0xffffe0)
public static let limeGreen = Color(0x32cd32)
public static let linen = Color(0xfaf0e6)
public static let mediumAquamarine = Color(0x66cdaa)
public static let mediumBlue = Color(0x0000cd)
public static let mediumOrchid = Color(0xba55d3)
public static let mediumPurple = Color(0x9370db)
public static let mediumSeaGreen = Color(0x3cb371)
public static let mediumSlateBlue = Color(0x7b68ee)
public static let mediumSpringGreen = Color(0x00fa9a)
public static let mediumTurquoise = Color(0x48d1cc)
public static let mediumVioletRed = Color(0xc71585)
public static let midnightBlue = Color(0x191970)
public static let mintCream = Color(0xf5fffa)
public static let mistyRose = Color(0xffe4e1)
public static let moccasin = Color(0xffe4b5)
public static let navajoWhite = Color(0xffdead)
public static let oldLace = Color(0xfdf5e6)
public static let oliveDrab = Color(0x6b8e23)
public static let orange = Color(0xffa500)
public static let orangeRed = Color(0xff4500)
public static let orchid = Color(0xda70d6)
public static let paleGoldenrod = Color(0xeee8aa)
public static let paleGreen = Color(0x98fb98)
public static let paleTurquoise = Color(0xafeeee)
public static let paleVioletRed = Color(0xdb7093)
public static let papayaWhip = Color(0xffefd5)
public static let peachPuff = Color(0xffdab9)
public static let peru = Color(0xcd853f)
public static let pink = Color(0xffc0cb)
public static let plum = Color(0xdda0dd)
public static let powderBlue = Color(0xb0e0e6)
public static let rebeccaPurple = Color(0x663399)
public static let rosyBrown = Color(0xbc8f8f)
public static let royalBlue = Color(0x4169e1)
public static let saddleBrown = Color(0x8b4513)
public static let salmon = Color(0xfa8072)
public static let sandyBrown = Color(0xf4a460)
public static let seaGreen = Color(0x2e8b57)
public static let seashell = Color(0xfff5ee)
public static let sienna = Color(0xa0522d)
public static let skyBlue = Color(0x87ceeb)
public static let slateBlue = Color(0x6a5acd)
public static let slateGray = Color(0x708090)
public static let snow = Color(0xfffafa)
public static let springGreen = Color(0x00ff7f)
public static let steelBlue = Color(0x4682b4)
public static let tan = Color(0xd2b48c)
public static let thistle = Color(0xd8bfd8)
public static let tomato = Color(0xff6347)
public static let turquoise = Color(0x40e0d0)
public static let violet = Color(0xee82ee)
public static let wheat = Color(0xf5deb3)
public static let whiteSmoke = Color(0xf5f5f5)
public static let yellowGreen = Color(0x9acd32)
public init(_ val: Int = 0) {
self.val = val
}
public init(val: Int = 0) {
self.val = val

View File

@ -5,6 +5,13 @@ open class Line: Locus {
public let x2: Double
public let y2: Double
public init(_ x1: Double, _ y1: Double, _ x2: Double, _ y2: Double) {
self.x1 = x1
self.y1 = y1
self.x2 = x2
self.y2 = y2
}
public init(x1: Double = 0, y1: Double = 0, x2: Double = 0, y2: Double = 0) {
self.x1 = x1
self.y1 = y1
@ -13,11 +20,7 @@ open class Line: Locus {
}
override open func bounds() -> Rect {
return Rect(
x: min(x1, x2),
y: min(y1, y2),
w: abs(x1 - x2),
h: abs(y1 - y2))
return Rect(x: min(x1, x2), y: min(y1, y2), w: abs(x1 - x2), h: abs(y1 - y2))
}
override open func toPath() -> Path {

View File

@ -15,10 +15,26 @@ open class Locus {
return Shape(form: self, fill: with)
}
open func fill(_ hex: Int) -> Shape {
return Shape(form: self, fill: Color(val: hex))
}
open func fill(_ fill: Fill) -> Shape {
return Shape(form: self, fill: fill)
}
open func stroke(fill: Fill = Color.black, width: Double = 1, cap: LineCap = .butt, join: LineJoin = .miter, dashes: [Double] = []) -> Shape {
return Shape(form: self, stroke: Stroke(fill: fill, width: width, cap: cap, join: join, dashes: dashes))
}
open func stroke(color: Color, width: Double = 1, cap: LineCap = .butt, join: LineJoin = .miter, dashes: [Double] = []) -> Shape {
return Shape(form: self, stroke: Stroke(fill: color, width: width, cap: cap, join: join, dashes: dashes))
}
open func stroke(color: Int, width: Double = 1, cap: LineCap = .butt, join: LineJoin = .miter, dashes: [Double] = []) -> Shape {
return Shape(form: self, stroke: Stroke(fill: Color(color), width: width, cap: cap, join: join, dashes: dashes))
}
open func toPath() -> Path {
fatalError("Unsupported locus: \(self)")
}

View File

@ -1,5 +1,9 @@
open class MoveTo: PathBuilder {
public init(_ x: Double, _ y: Double) {
super.init(segment: PathSegment(type: .M, data: [x, y]))
}
public init(x: Double, y: Double) {
super.init(segment: PathSegment(type: .M, data: [x, y]))
}

View File

@ -5,7 +5,12 @@ open class Point: Locus {
public let x: Double
public let y: Double
public static let origin: Point = Point( x: 0, y: 0 )
public static let origin = Point(0, 0)
public init(_ x: Double, _ y: Double) {
self.x = x
self.y = y
}
public init(x: Double = 0, y: Double = 0) {
self.x = x

View File

@ -4,6 +4,10 @@ open class Polygon: Locus {
public let points: [Double]
public init(_ points: [Double]) {
self.points = points
}
public init(points: [Double] = []) {
self.points = points
}

View File

@ -4,6 +4,10 @@ open class Polyline: Locus {
public let points: [Double]
public init(_ points: [Double]) {
self.points = points
}
public init(points: [Double] = []) {
self.points = points
}

View File

@ -5,6 +5,13 @@ open class Rect: Locus {
public let w: Double
public let h: Double
public init(_ x: Double, _ y: Double, _ w: Double, _ h: Double) {
self.x = x
self.y = y
self.w = w
self.h = h
}
public init(x: Double = 0, y: Double = 0, w: Double = 0, h: Double = 0) {
self.x = x
self.y = y

View File

@ -5,7 +5,12 @@ open class Size {
public let w: Double
public let h: Double
public static let zero: Size = Size(w: 0, h: 0)
public static let zero = Size(0, 0)
public init(_ w: Double, _ h: Double) {
self.w = w
self.h = h
}
public init(w: Double = 0, h: Double = 0) {
self.w = w

View File

@ -9,7 +9,16 @@ public final class Transform {
public let dx: Double
public let dy: Double
public static let identity: Transform = Transform()
public static let identity = Transform()
public init(_ m11: Double, _ m12: Double, _ m21: Double, _ m22: Double, _ dx: Double, _ dy: Double) {
self.m11 = m11
self.m12 = m12
self.m21 = m21
self.m22 = m22
self.dx = dx
self.dy = dy
}
public init(m11: Double = 1, m12: Double = 0, m21: Double = 0, m22: Double = 1, dx: Double = 0, dy: Double = 0) {
self.m11 = m11
@ -20,39 +29,74 @@ public final class Transform {
self.dy = dy
}
public func move(dx: Double, dy: Double) -> Transform {
return Transform(m11: m11, m12: m12, m21: m21, m22: m22,
dx: dx * m11 + dy * m21 + self.dx, dy: dx * m12 + dy * m22 + self.dy)
public func move(_ dx: Double, _ dy: Double) -> Transform {
return move(dx: dx, dy: dy)
}
public func scale(sx: Double, sy: Double) -> Transform {
public func move(dx: Double = 0, dy: Double = 0) -> Transform {
return Transform(m11: m11, m12: m12, m21: m21, m22: m22,
dx: dx * m11 + dy * m21 + self.dx,
dy: dx * m12 + dy * m22 + self.dy)
}
public func scale(sx: Double = 0, sy: Double = 0) -> Transform {
return Transform(m11: m11 * sx, m12: m12 * sx, m21: m21 * sy, m22: m22 * sy, dx: dx, dy: dy)
}
public func shear(shx: Double, shy: Double) -> Transform {
public func scale(_ sx: Double, _ sy: Double) -> Transform {
return scale(sx: sx, sy: sy)
}
public func shear(shx: Double = 0, shy: Double = 0) -> Transform {
return Transform(m11: m11 + m21 * shy, m12: m12 + m22 * shy,
m21: m11 * shx + m21, m22: m12 * shx + m22, dx: dx, dy: dy)
}
public func rotate(angle: Double) -> Transform {
let asin = sin(angle); let acos = cos(angle)
return Transform(m11: acos * m11 + asin * m21, m12: acos * m12 + asin * m22,
m21: -asin * m11 + acos * m21, m22: -asin * m12 + acos * m22, dx: dx, dy: dy)
public func shear(_ shx: Double, _ shy: Double) -> Transform {
return shear(shx: shx, shy: shy)
}
public func rotate(angle: Double, x: Double, y: Double) -> Transform {
public func rotate(angle: Double) -> Transform {
let asin = sin(angle)
let acos = cos(angle)
return Transform(m11: acos * m11 + asin * m21, m12: acos * m12 + asin * m22,
m21: -asin * m11 + acos * m21, m22: -asin * m12 + acos * m22,
dx: dx, dy: dy)
}
public func rotate(_ angle: Double) -> Transform {
return rotate(angle: angle)
}
public func rotate(angle: Double, x: Double = 0, y: Double = 0) -> Transform {
return move(dx: x, dy: y).rotate(angle: angle).move(dx: -x, dy: -y)
}
public class func move(dx: Double, dy: Double) -> Transform {
public func rotate(_ angle: Double, _ x: Double, _ y: Double) -> Transform {
return rotate(angle: angle, x: x, y: y)
}
public class func move(dx: Double = 0, dy: Double = 0) -> Transform {
return Transform(dx: dx, dy: dy)
}
public class func scale(sx: Double, sy: Double) -> Transform {
public class func move(_ dx: Double, _ dy: Double) -> Transform {
return Transform(dx: dx, dy: dy)
}
public class func scale(sx: Double = 0, sy: Double = 0) -> Transform {
return Transform(m11: sx, m22: sy)
}
public class func shear(shx: Double, shy: Double) -> Transform {
public class func scale(_ sx: Double, _ sy: Double) -> Transform {
return Transform(m11: sx, m22: sy)
}
public class func shear(shx: Double = 0, shy: Double = 0) -> Transform {
return Transform(m12: shy, m21: shx)
}
public class func shear(_ shx: Double, _ shy: Double) -> Transform {
return Transform(m12: shy, m21: shx)
}
@ -61,10 +105,18 @@ public final class Transform {
return Transform(m11: acos, m12: asin, m21: -asin, m22: acos)
}
public class func rotate(angle: Double, x: Double, y: Double) -> Transform {
public class func rotate(_ angle: Double) -> Transform {
return rotate(angle: angle)
}
public class func rotate(angle: Double, x: Double = 0, y: Double = 0) -> Transform {
return Transform.move(dx: x, dy: y).rotate(angle: angle).move(dx: -x, dy: -y)
}
public class func rotate(_ angle: Double, _ x: Double, _ y: Double) -> Transform {
return rotate(angle: angle, x: x, y: y)
}
public func concat(with: Transform) -> Transform {
let nm11 = with.m11 * m11 + with.m12 * m21
let nm21 = with.m21 * m11 + with.m22 * m21

View File

@ -64,7 +64,9 @@ open class Image: Node {
tag: tag
)
srcVar.onChange { _ in self.mImage = nil }
srcVar.onChange { [weak self] _ in
self?.mImage = nil
}
}
public init(image: MImage, xAlign: Align = .min, yAlign: Align = .min, aspectRatio: AspectRatio = .none, w: Int = 0, h: Int = 0, place: Transform = Transform.identity, opaque: Bool = true, opacity: Double = 1, clip: Locus? = nil, effect: Effect? = nil, visible: Bool = true, tag: [String] = []) {
@ -93,7 +95,9 @@ open class Image: Node {
tag: tag
)
srcVar.onChange { _ in self.mImage = nil }
srcVar.onChange { [weak self] _ in
self?.mImage = nil
}
}
override open var bounds: Rect? {

View File

@ -160,4 +160,20 @@ extension MBezierPath {
}
}
extension CGContext {
private struct CGContextScale {
static var _scale: CGFloat = 0.0
}
var scale: CGFloat {
get {
return CGContextScale._scale
}
set(newValue) {
CGContextScale._scale = newValue
}
}
}
#endif

View File

@ -11,8 +11,6 @@ import Foundation
#if os(OSX)
import AppKit
private var imageContextStack: [CGFloat] = []
func MGraphicsGetCurrentContext() -> CGContext? {
return NSGraphicsContext.current?.cgContext
}
@ -54,8 +52,6 @@ func MGraphicsBeginImageContextWithOptions(_ size: CGSize, _ opaque: Bool, _ sca
let height = Int(size.height * scale)
if width > 0 && height > 0 {
imageContextStack.append(scale)
let colorSpace = CGColorSpaceCreateDeviceRGB()
guard let ctx = CGContext(data: nil, width: width, height: height, bitsPerComponent: 8, bytesPerRow: 4 * width, space: colorSpace, bitmapInfo: (opaque ? CGImageAlphaInfo.noneSkipFirst.rawValue : CGImageAlphaInfo.premultipliedFirst.rawValue)) else {
@ -64,32 +60,24 @@ func MGraphicsBeginImageContextWithOptions(_ size: CGSize, _ opaque: Bool, _ sca
ctx.concatenate(CGAffineTransform(a: 1, b: 0, c: 0, d: -1, tx: 0, ty: CGFloat(height)))
ctx.scaleBy(x: scale, y: scale)
ctx.scale = scale
MGraphicsPushContext(ctx)
}
}
func MGraphicsGetImageFromCurrentImageContext() -> MImage? {
if !imageContextStack.isEmpty {
guard let ctx = MGraphicsGetCurrentContext() else {
guard let ctx = MGraphicsGetCurrentContext(),
let theCGImage = ctx.makeImage() else {
return nil
}
let scale = imageContextStack.last!
if let theCGImage = ctx.makeImage() {
let size = CGSize(width: CGFloat(ctx.width) / scale, height: CGFloat(ctx.height) / scale)
let image = NSImage(cgImage: theCGImage, size: size)
return image
}
}
return nil
let scale = ctx.scale
let size = CGSize(width: CGFloat(ctx.width) / scale, height: CGFloat(ctx.height) / scale)
let image = NSImage(cgImage: theCGImage, size: size)
return image
}
func MGraphicsEndImageContext() {
if imageContextStack.last != nil {
imageContextStack.removeLast()
MGraphicsPopContext()
}
MGraphicsPopContext()
}
func MNoIntrinsicMetric() -> CGFloat {

View File

@ -54,7 +54,9 @@ class RenderUtils {
let lowerWeight = weight?.lowercased()
if lowerWeight == "bold" || lowerWeight == "bolder" {
#if os(iOS)
fontDesc = fontDesc.withSymbolicTraits(.traitBold)!
if let boldDesc = fontDesc.withSymbolicTraits(.traitBold) {
fontDesc = boldDesc
}
#elseif os(OSX)
fontDesc = fontDesc.withSymbolicTraits(.bold)
#endif

View File

@ -156,7 +156,7 @@ open class SVGParser {
}
if let id = element.allAttributes["id"]?.text {
switch element.name {
case "linearGradient", "radialGradient", "fill":
case "linearGradient", "radialGradient", SVGKeys.fill:
defFills[id] = try parseFill(node)
case "pattern":
defPatterns[id] = try parsePattern(node)
@ -316,7 +316,7 @@ open class SVGParser {
case "use":
return try parseUse(node, groupStyle: style, place: position)
case "title", "desc", "mask", "clip", "filter",
"linearGradient", "radialGradient", "fill":
"linearGradient", "radialGradient", SVGKeys.fill:
break
default:
print("SVG parsing error. Shape \(element.name) not supported")
@ -571,9 +571,14 @@ open class SVGParser {
}
}
let hasCurrentColor = styleAttributes[SVGKeys.fill] == SVGKeys.currentColor
self.availableStyleAttributes.forEach { availableAttribute in
if let styleAttribute = element.allAttributes[availableAttribute]?.text, styleAttribute != "inherit" {
styleAttributes.updateValue(styleAttribute, forKey: availableAttribute)
if !hasCurrentColor || availableAttribute != SVGKeys.color {
styleAttributes.updateValue(styleAttribute, forKey: availableAttribute)
}
}
}
@ -625,7 +630,7 @@ open class SVGParser {
opacity = Double(fillOpacity.replacingOccurrences(of: " ", with: "")) ?? 1
}
guard var fillColor = styleParts["fill"] else {
guard var fillColor = styleParts[SVGKeys.fill] else {
return Color.black.with(a: opacity)
}
if let colorId = parseIdFromUrl(fillColor) {
@ -636,7 +641,7 @@ open class SVGParser {
return getPatternFill(pattern: pattern, locus: locus)
}
}
if fillColor == "currentColor", let currentColor = groupStyle["color"] {
if fillColor == SVGKeys.currentColor, let currentColor = groupStyle[SVGKeys.color] {
fillColor = currentColor
}
@ -660,7 +665,7 @@ open class SVGParser {
guard var strokeColor = styleParts["stroke"] else {
return .none
}
if strokeColor == "currentColor", let currentColor = groupStyle["color"] {
if strokeColor == SVGKeys.currentColor, let currentColor = groupStyle[SVGKeys.color] {
strokeColor = currentColor
}
var opacity: Double = 1
@ -997,7 +1002,7 @@ open class SVGParser {
let attributes = getStyleAttributes([:], element: element)
return Text(text: text, font: getFont(attributes, fontName: fontName, fontWeight: fontWeight, fontSize: fontSize),
fill: (attributes["fill"] != nil) ? getFillColor(attributes)! : fill, stroke: stroke ?? getStroke(attributes),
fill: (attributes[SVGKeys.fill] != nil) ? getFillColor(attributes)! : fill, stroke: stroke ?? getStroke(attributes),
align: anchorToAlign(textAnchor ?? getTextAnchor(attributes)), baseline: .alphabetic,
place: pos, opacity: getOpacity(attributes), tag: getTag(element))
}
@ -1352,7 +1357,7 @@ open class SVGParser {
}
var color = Color.black.with(a: opacity)
if var stopColor = getStyleAttributes([:], element: element)["stop-color"] {
if stopColor == "currentColor", let currentColor = groupStyle["color"] {
if stopColor == SVGKeys.currentColor, let currentColor = groupStyle[SVGKeys.color] {
stopColor = currentColor
}
color = createColor(stopColor.replacingOccurrences(of: " ", with: ""), opacity: opacity)!
@ -1605,7 +1610,7 @@ private class PathDataReader {
}
public func read() -> [PathSegment] {
_ = readNext()
readNext()
var segments = [PathSegment]()
while let array = readSegments() {
segments.append(contentsOf: array)
@ -1620,7 +1625,12 @@ private class PathDataReader {
return [PathSegment(type: type)]
}
var result = [PathSegment]()
let data = readData()
let data: [Double]
if type == .a || type == .A {
data = readDataOfASegment()
} else {
data = readData()
}
var index = 0
var isFirstSegment = true
while index < data.count {
@ -1658,6 +1668,28 @@ private class PathDataReader {
}
}
private func readDataOfASegment() -> [Double] {
let argCount = getArgCount(segment: .A)
var data: [Double] = []
var index = 0
while true {
skipSpaces()
let value: Double?
let indexMod = index % argCount
if indexMod == 3 || indexMod == 4 {
value = readFlag()
} else {
value = readNum()
}
guard let doubleValue = value else {
return data
}
data.append(doubleValue)
index += 1
}
return data
}
private func skipSpaces() {
var ch = current
while ch != nil && "\n\r\t ,".contains(String(ch!)) {
@ -1665,21 +1697,42 @@ private class PathDataReader {
}
}
private func readFlag() -> Double? {
guard let ch = current else {
return .none
}
readNext()
switch ch {
case "0":
return 0
case "1":
return 1
default:
return .none
}
}
fileprivate func readNum() -> Double? {
guard let ch = current else {
return nil
return .none
}
if (ch >= "0" && ch <= "9") || ch == "." || ch == "-" {
var chars = [ch]
var hasDot = ch == "."
while let ch = readDigit(&hasDot) {
chars.append(ch)
}
var buf = ""
buf.unicodeScalars.append(contentsOf: chars)
return Double(buf)
guard ch >= "0" && ch <= "9" || ch == "." || ch == "-" else {
return .none
}
return nil
var chars = [ch]
var hasDot = ch == "."
while let ch = readDigit(&hasDot) {
chars.append(ch)
}
var buf = ""
buf.unicodeScalars.append(contentsOf: chars)
guard let value = Double(buf) else {
return .none
}
return value
}
fileprivate func readDigit(_ hasDot: inout Bool) -> UnicodeScalar? {
@ -1709,6 +1762,7 @@ private class PathDataReader {
return false
}
@discardableResult
private func readNext() -> UnicodeScalar? {
previous = current
current = iterator.next()
@ -1725,7 +1779,7 @@ private class PathDataReader {
private func readSegmentType() -> PathSegmentType? {
while true {
if let type = getPathSegmentType() {
_ = readNext()
readNext()
return type
}
if readNext() == nil {
@ -1842,3 +1896,9 @@ fileprivate class UserSpacePattern {
self.contentUserSpace = contentUserSpace
}
}
fileprivate enum SVGKeys {
static let fill = "fill"
static let color = "color"
static let currentColor = "currentColor"
}

View File

@ -81,7 +81,7 @@ open class MacawZoom {
}
private func getNewZoom() -> ZoomData {
if touches.count == 0 || (touches.count == 1 && !trackMove) {
if touches.isEmpty || (touches.count == 1 && !trackMove) {
return zoomData
}
let s1 = touches[0].point