Skip to content

Commit

Permalink
Merge pull request #373 from f3dm76/task/miterLimit
Browse files Browse the repository at this point in the history
Fix #348: Attribute stroke-miterlimit is ignored
  • Loading branch information
ystrot authored May 25, 2018
2 parents 8c8230f + 0295c0e commit 7a094c0
Show file tree
Hide file tree
Showing 10 changed files with 1,886 additions and 689 deletions.
1,386 changes: 701 additions & 685 deletions Macaw.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions MacawTests/MacawSVGTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ class MacawSVGTests: XCTestCase {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}

func testCreate() {
createJSON("painting-stroke-07-t-manual")
createJSON("shapes-polyline-02-t-manual")
}

func validate(node: Node, referenceFile: String) {
let bundle = Bundle(for: type(of: TestUtils()))
Expand Down Expand Up @@ -249,6 +254,11 @@ class MacawSVGTests: XCTestCase {
validateJSON("painting-stroke-02-t-manual")
}

func testPaintingStroke07() {
validateJSON("painting-stroke-07-t-manual")
}


func testPathsData01() {
validateJSON("paths-data-01-t-manual")
}
Expand Down Expand Up @@ -297,6 +307,10 @@ class MacawSVGTests: XCTestCase {
validateJSON("shapes-polyline-01-t-manual")
}

func testShapesPolyline02() {
validateJSON("shapes-polyline-02-t-manual")
}

func testShapesPolygon02() {
validateJSON("shapes-polygon-02-t-manual")
}
Expand Down
4 changes: 2 additions & 2 deletions MacawTests/w3c-test-suite.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Status of each test:
|[painting-stroke-04-t-manual](w3cSVGTests/painting-stroke-04-t-manual.svg) ||
|[painting-stroke-05-t-manual](w3cSVGTests/painting-stroke-05-t-manual.svg) ||
|[painting-stroke-06-t-manual](w3cSVGTests/painting-stroke-06-t-manual.svg) ||
|[painting-stroke-07-t-manual](w3cSVGTests/painting-stroke-07-t-manual.svg) | [#348](https://github.com/exyte/Macaw/issues/348) |
|[painting-stroke-07-t-manual](w3cSVGTests/painting-stroke-07-t-manual.svg) | |
|[painting-stroke-08-t-manual](w3cSVGTests/painting-stroke-08-t-manual.svg) ||
|[painting-stroke-09-t-manual](w3cSVGTests/painting-stroke-09-t-manual.svg) ||
|[painting-stroke-10-t-manual](w3cSVGTests/painting-stroke-10-t-manual.svg) ||
Expand Down Expand Up @@ -241,7 +241,7 @@ Status of each test:
|[shapes-polygon-02-t-manual](w3cSVGTests/shapes-polygon-02-t-manual.svg) ||
|[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-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-04-f-manual](w3cSVGTests/shapes-rect-04-f-manual.svg) ||
Expand Down
321 changes: 321 additions & 0 deletions MacawTests/w3cSVGTests/painting-stroke-07-t-manual.reference
Original file line number Diff line number Diff line change
@@ -0,0 +1,321 @@
{
"layout" : {
"yAligningMode" : "mid",
"scalingMode" : "meet",
"svgSize" : {
"height" : "100.0%",
"width" : "100.0%"
},
"xAligningMode" : "mid",
"viewBox" : {
"x" : 0,
"w" : 480,
"type" : "Rect",
"y" : 0,
"h" : 360
}
},
"contents" : [
{
"contents" : [
{
"place" : "1.2, 0, 0, 1.2, 72, 36",
"contents" : [
{
"stroke" : {
"join" : "miter",
"cap" : "butt",
"fill" : {
"type" : "Color",
"val" : 0
},
"dashes" : [

],
"width" : 10
},
"form" : {
"type" : "Path",
"segments" : [
{
"type" : "M",
"data" : [
20,
20
]
},
{
"type" : "L",
"data" : [
200,
30
]
},
{
"type" : "L",
"data" : [
20,
40
]
}
]
},
"node" : "Shape"
},
{
"stroke" : {
"join" : "miter",
"cap" : "butt",
"fill" : {
"type" : "Color",
"val" : 0
},
"dashes" : [

],
"width" : 10
},
"form" : {
"type" : "Path",
"segments" : [
{
"type" : "M",
"data" : [
20,
50
]
},
{
"type" : "L",
"data" : [
200,
60
]
},
{
"type" : "L",
"data" : [
20,
70
]
}
]
},
"node" : "Shape"
},
{
"stroke" : {
"join" : "miter",
"cap" : "butt",
"fill" : {
"type" : "Color",
"val" : 0
},
"dashes" : [

],
"width" : 10
},
"form" : {
"type" : "Path",
"segments" : [
{
"type" : "M",
"data" : [
20,
80
]
},
{
"type" : "L",
"data" : [
200,
90
]
},
{
"type" : "L",
"data" : [
20,
100
]
}
]
},
"node" : "Shape"
},
{
"stroke" : {
"join" : "miter",
"cap" : "butt",
"fill" : {
"type" : "Color",
"val" : 0
},
"dashes" : [

],
"width" : 10
},
"form" : {
"type" : "Path",
"segments" : [
{
"type" : "M",
"data" : [
20,
110
]
},
{
"type" : "L",
"data" : [
200,
120
]
},
{
"type" : "L",
"data" : [
20,
130
]
}
]
},
"node" : "Shape"
},
{
"stroke" : {
"join" : "miter",
"cap" : "butt",
"fill" : {
"type" : "Color",
"val" : 0
},
"dashes" : [

],
"width" : 10
},
"form" : {
"type" : "Path",
"segments" : [
{
"type" : "M",
"data" : [
20,
140
]
},
{
"type" : "L",
"data" : [
200,
150
]
},
{
"type" : "L",
"data" : [
20,
160
]
}
]
},
"node" : "Shape"
},
{
"stroke" : {
"join" : "miter",
"cap" : "butt",
"fill" : {
"type" : "Color",
"val" : 0
},
"dashes" : [

],
"width" : 10
},
"form" : {
"type" : "Path",
"segments" : [
{
"type" : "M",
"data" : [
20,
170
]
},
{
"type" : "L",
"data" : [
200,
180
]
},
{
"type" : "L",
"data" : [
20,
190
]
}
]
},
"node" : "Shape"
}
],
"node" : "Group"
}
],
"node" : "Group"
},
{
"contents" : [
{
"baseline" : "bottom",
"fill" : {
"type" : "Color",
"val" : 0
},
"node" : "Text",
"align" : "min",
"text" : "$Revision: 1.7 $",
"place" : "1, 0, 0, 1, 10, 340",
"font" : {
"name" : "SVGFreeSansASCII,sans-serif",
"size" : 32,
"weight" : "normal"
}
}
],
"node" : "Group"
},
{
"stroke" : {
"join" : "miter",
"cap" : "butt",
"fill" : {
"type" : "Color",
"val" : 0
},
"dashes" : [

],
"width" : 1
},
"form" : {
"x" : 1,
"w" : 478,
"type" : "Rect",
"y" : 1,
"h" : 358
},
"node" : "Shape"
}
],
"node" : "Canvas"
}
Loading

0 comments on commit 7a094c0

Please sign in to comment.