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

#347 add svg tests for coords-trans

This commit is contained in:
Daniil Manin 2019-05-24 14:36:37 +07:00
parent 4c91b10e7e
commit d221718fd7
12 changed files with 3681 additions and 34 deletions

View File

@ -512,6 +512,16 @@
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 */; };
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 */; };
@ -927,10 +937,20 @@
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; };
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>"; };
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>"; };
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>"; };
@ -1404,6 +1424,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 */,
@ -1782,6 +1812,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 */,
@ -1815,6 +1846,7 @@
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 */,
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 */,
@ -1830,6 +1862,7 @@
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 */,
5BAE2047208E163D006BF277 /* viewBox.reference in Resources */,
@ -1847,6 +1880,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 */,
@ -1900,8 +1934,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 */,
@ -1919,6 +1955,7 @@
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 */,
@ -1946,11 +1983,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

@ -281,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")
}
@ -321,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")
}
@ -425,10 +469,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")
}
@ -457,10 +497,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")
}
@ -513,14 +549,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")
}
@ -537,14 +565,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

@ -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