From e59f07699281b932547d8f692afc96d073029e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 20 Dec 2011 22:04:55 +0100 Subject: [PATCH] Now that Path#strokeBounds produces correct results, the tests need fixing too. --- test/tests/Path_Bounds.js | 6 +++--- test/tests/PlacedSymbol.js | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/tests/Path_Bounds.js b/test/tests/Path_Bounds.js index f7a30f0a..00c12e71 100644 --- a/test/tests/Path_Bounds.js +++ b/test/tests/Path_Bounds.js @@ -136,7 +136,7 @@ test('path.bounds & path.strokeBounds with stroke styles', function() { { x: 199.01325, y: 166.78419, width: 113.50622, height: 90.96766 }, 'square/round path.bounds'); compareRectangles(path.strokeBounds, - { x: 178.06332, y: 150.9807, width: 149.45615, height: 121.77115 }, + { x: 178.06332, y: 151.78419, width: 149.45615, height: 120.96766 }, 'square/strokeBounds path.bounds'); var path = makePath().translate(150, 150); @@ -147,7 +147,7 @@ test('path.bounds & path.strokeBounds with stroke styles', function() { { x: 349.01325, y: 166.78419, width: 113.50622, height: 90.96766 }, 'square/bevel path.bounds'); compareRectangles(path.strokeBounds, - { x: 328.06332, y: 150.9807, width: 149.45615, height: 120.53383 }, + { x: 328.06332, y: 151.78419, width: 149.45615, height: 119.73034 }, 'square/bevel path.strokeBounds'); var path = makePath().translate(300, 150); @@ -158,7 +158,7 @@ test('path.bounds & path.strokeBounds with stroke styles', function() { { x: 499.01325, y: 166.78419, width: 113.50622, height: 90.96766 }, 'square/miter path.bounds'); compareRectangles(path.strokeBounds, - { x: 478.06332, y: 150.9807, width: 149.45615, height: 134.45231 }, + { x: 478.06332, y: 151.78419, width: 149.45615, height: 133.64882 }, 'square/miter path.strokeBounds'); var path = makePath().translate(0, 300); diff --git a/test/tests/PlacedSymbol.js b/test/tests/PlacedSymbol.js index d4bc6c9c..6b5586f1 100644 --- a/test/tests/PlacedSymbol.js +++ b/test/tests/PlacedSymbol.js @@ -24,23 +24,23 @@ test('placedSymbol bounds', function() { path.strokeJoin = 'round'; compareRectangles(path.strokeBounds, { x: -0.5, y: -0.5, width: 101, height: 101 }, - 'Path initial bounds.'); + 'Path initial bounds'); var symbol = new Symbol(path); var placedSymbol = new PlacedSymbol(symbol); compareRectangles(placedSymbol.bounds, new Rectangle(-50.5, -50.5, 101, 101), - 'PlacedSymbol initial bounds.'); + 'PlacedSymbol initial bounds'); placedSymbol.scale(1, 0.5); compareRectangles(placedSymbol.bounds, { x: -50.5, y: -25.25, width: 101, height: 50.5 }, - 'Bounds after scale.'); + 'Bounds after scale'); placedSymbol.rotate(40); compareRectangles(placedSymbol.bounds, - { x: -42.04736, y: -37.91846, width: 84.09473, height: 75.83691 }, - 'Bounds after rotation.'); + { x: -41.96283, y: -37.79252, width: 83.92567, height: 75.58503 }, + 'Bounds after rotation'); }); test('bounds of group of symbol instances', function() {