From: Matthias Kramm Date: Tue, 13 Oct 2009 02:40:41 +0000 (-0700) Subject: fixed indent X-Git-Tag: version-0-9-1~261 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=89bfd8df02d3f8a877e6f7d8d9cb877fffb1c251;p=swftools.git fixed indent --- diff --git a/spec/circularfill.spec.rb b/spec/circularfill.spec.rb index 5d15d2d..587a2d2 100644 --- a/spec/circularfill.spec.rb +++ b/spec/circularfill.spec.rb @@ -1,29 +1,30 @@ require File.dirname(__FILE__) + '/spec_helper' describe "pdf conversion" do - convert_file "circularfill.pdf" do - pixel_at(194,224).should_be_of_color 0xffffff - pixel_at(169,225).should_be_of_color 0xff0000 - pixel_at(138,225).should_be_of_color 0xffffff - pixel_at(72,162).should_be_of_color 0xff0000 - pixel_at(195,132).should_be_of_color 0xff0000 - pixel_at(69,132).should_be_of_color 0xffffff - pixel_at(310,289).should_be_of_color 0xff0000 - pixel_at(287,200).should_be_of_color 0xff0000 - pixel_at(309,161).should_be_of_color 0xff0000 - pixel_at(287,161).should_be_of_color 0xff0000 - pixel_at(109,336).should_be_of_color 0xff0000 - pixel_at(310,306).should_be_of_color 0xff0000 - pixel_at(282,340).should_be_of_color 0xff0000 - pixel_at(409,252).should_be_of_color 0xff0000 - pixel_at(139,310).should_be_of_color 0xffffff - pixel_at(312,343).should_be_of_color 0xffffff - pixel_at(311,248).should_be_of_color 0xff0000 - pixel_at(102,228).should_be_of_color 0xff0000 - pixel_at(374,281).should_be_of_color 0xff0000 - pixel_at(167,281).should_be_of_color 0xff0000 - pixel_at(409,285).should_be_of_color 0xffffff - pixel_at(166,190).should_be_of_color 0xffffff - pixel_at(138,191).should_be_of_color 0xff0000 - end + + convert_file "circularfill.pdf" do + pixel_at(194,224).should_be_of_color 0xffffff + pixel_at(169,225).should_be_of_color 0xff0000 + pixel_at(138,225).should_be_of_color 0xffffff + pixel_at(72,162).should_be_of_color 0xff0000 + pixel_at(195,132).should_be_of_color 0xff0000 + pixel_at(69,132).should_be_of_color 0xffffff + pixel_at(310,289).should_be_of_color 0xff0000 + pixel_at(287,200).should_be_of_color 0xff0000 + pixel_at(309,161).should_be_of_color 0xff0000 + pixel_at(287,161).should_be_of_color 0xff0000 + pixel_at(109,336).should_be_of_color 0xff0000 + pixel_at(310,306).should_be_of_color 0xff0000 + pixel_at(282,340).should_be_of_color 0xff0000 + pixel_at(409,252).should_be_of_color 0xff0000 + pixel_at(139,310).should_be_of_color 0xffffff + pixel_at(312,343).should_be_of_color 0xffffff + pixel_at(311,248).should_be_of_color 0xff0000 + pixel_at(102,228).should_be_of_color 0xff0000 + pixel_at(374,281).should_be_of_color 0xff0000 + pixel_at(167,281).should_be_of_color 0xff0000 + pixel_at(409,285).should_be_of_color 0xffffff + pixel_at(166,190).should_be_of_color 0xffffff + pixel_at(138,191).should_be_of_color 0xff0000 + end end diff --git a/spec/gradients.spec.rb b/spec/gradients.spec.rb index 62aebbb..3a9271c 100644 --- a/spec/gradients.spec.rb +++ b/spec/gradients.spec.rb @@ -1,34 +1,35 @@ require File.dirname(__FILE__) + '/spec_helper' describe "pdf conversion" do - convert_file "gradients.pdf" do - pixel_at(269,324).should_be_brighter_than pixel_at(155,438) - pixel_at(261,388).should_be_brighter_than pixel_at(209,434) - pixel_at(195,329).should_be_brighter_than pixel_at(164,367) - pixel_at(33,318).should_be_brighter_than pixel_at(92,381) - pixel_at(168,310).should_be_brighter_than pixel_at(108,381) - pixel_at(166,455).should_be_brighter_than pixel_at(109,401) - pixel_at(25,454).should_be_brighter_than pixel_at(89,396) - pixel_at(258,210).should_be_brighter_than pixel_at(90,215) - pixel_at(259,225).should_be_brighter_than pixel_at(95,227) - pixel_at(257,240).should_be_brighter_than pixel_at(102,240) - pixel_at(359,121).should_be_brighter_than pixel_at(360,270) - pixel_at(383,119).should_be_brighter_than pixel_at(385,181) - pixel_at(373,167).should_be_brighter_than pixel_at(373,239) - pixel_at(355,409).should_be_brighter_than pixel_at(356,349) - pixel_at(370,377).should_be_brighter_than pixel_at(369,316) - pixel_at(382,333).should_be_brighter_than pixel_at(383,286) - pixel_at(422,115).should_be_brighter_than pixel_at(422,411) - pixel_at(437,190).should_be_brighter_than pixel_at(436,318) - pixel_at(447,276).should_be_brighter_than pixel_at(446,413) - pixel_at(413,101).should_be_the_same_as pixel_at(448,101) - pixel_at(412,166).should_be_the_same_as pixel_at(449,166) - pixel_at(412,246).should_be_the_same_as pixel_at(450,246) - pixel_at(413,332).should_be_the_same_as pixel_at(450,332) - pixel_at(414,400).should_be_the_same_as pixel_at(451,400) - pixel_at(87,245).should_be_the_same_as pixel_at(87,212) - pixel_at(143,245).should_be_the_same_as pixel_at(143,209) - pixel_at(189,246).should_be_the_same_as pixel_at(189,210) - pixel_at(236,244).should_be_the_same_as pixel_at(236,208) - end + + convert_file "gradients.pdf" do + pixel_at(269,324).should_be_brighter_than pixel_at(155,438) + pixel_at(261,388).should_be_brighter_than pixel_at(209,434) + pixel_at(195,329).should_be_brighter_than pixel_at(164,367) + pixel_at(33,318).should_be_brighter_than pixel_at(92,381) + pixel_at(168,310).should_be_brighter_than pixel_at(108,381) + pixel_at(166,455).should_be_brighter_than pixel_at(109,401) + pixel_at(25,454).should_be_brighter_than pixel_at(89,396) + pixel_at(258,210).should_be_brighter_than pixel_at(90,215) + pixel_at(259,225).should_be_brighter_than pixel_at(95,227) + pixel_at(257,240).should_be_brighter_than pixel_at(102,240) + pixel_at(359,121).should_be_brighter_than pixel_at(360,270) + pixel_at(383,119).should_be_brighter_than pixel_at(385,181) + pixel_at(373,167).should_be_brighter_than pixel_at(373,239) + pixel_at(355,409).should_be_brighter_than pixel_at(356,349) + pixel_at(370,377).should_be_brighter_than pixel_at(369,316) + pixel_at(382,333).should_be_brighter_than pixel_at(383,286) + pixel_at(422,115).should_be_brighter_than pixel_at(422,411) + pixel_at(437,190).should_be_brighter_than pixel_at(436,318) + pixel_at(447,276).should_be_brighter_than pixel_at(446,413) + pixel_at(413,101).should_be_the_same_as pixel_at(448,101) + pixel_at(412,166).should_be_the_same_as pixel_at(449,166) + pixel_at(412,246).should_be_the_same_as pixel_at(450,246) + pixel_at(413,332).should_be_the_same_as pixel_at(450,332) + pixel_at(414,400).should_be_the_same_as pixel_at(451,400) + pixel_at(87,245).should_be_the_same_as pixel_at(87,212) + pixel_at(143,245).should_be_the_same_as pixel_at(143,209) + pixel_at(189,246).should_be_the_same_as pixel_at(189,210) + pixel_at(236,244).should_be_the_same_as pixel_at(236,208) + end end diff --git a/spec/imagematrix.spec.rb b/spec/imagematrix.spec.rb index d5c599d..5559295 100644 --- a/spec/imagematrix.spec.rb +++ b/spec/imagematrix.spec.rb @@ -1,118 +1,119 @@ require File.dirname(__FILE__) + '/spec_helper' describe "pdf conversion" do - convert_file "imagematrix.pdf" do - pixel_at(22,239).should_be_of_color 0xff00ff - pixel_at(45,240).should_be_of_color 0x0000ff - pixel_at(72,239).should_be_of_color 0xffff00 - pixel_at(98,236).should_be_of_color 0xff0000 - pixel_at(99,312).should_be_of_color 0xffffff - pixel_at(80,312).should_be_of_color 0xff00ff - pixel_at(46,312).should_be_of_color 0x00ffff - pixel_at(26,314).should_be_of_color 0x0000ff - pixel_at(21,385).should_be_of_color 0xffff00 - pixel_at(46,384).should_be_of_color 0xff00ff - pixel_at(71,384).should_be_of_color 0x00ff00 - pixel_at(95,383).should_be_of_color 0x0000ff - pixel_at(97,459).should_be_of_color 0x00ffff - pixel_at(75,460).should_be_of_color 0x0000ff - pixel_at(50,460).should_be_of_color 0xffffff - pixel_at(23,461).should_be_of_color 0x00ff00 - pixel_at(216,436).should_be_of_color 0xff00ff - pixel_at(213,415).should_be_of_color 0x0000ff - pixel_at(214,386).should_be_of_color 0xffff00 - pixel_at(216,360).should_be_of_color 0x00ff00 - pixel_at(234,364).should_be_of_color 0xffffff - pixel_at(235,388).should_be_of_color 0xff00ff - pixel_at(233,416).should_be_of_color 0x00ffff - pixel_at(237,431).should_be_of_color 0x0000ff - pixel_at(260,433).should_be_of_color 0xffff00 - pixel_at(263,414).should_be_of_color 0xff00ff - pixel_at(261,393).should_be_of_color 0x00ff00 - pixel_at(263,365).should_be_of_color 0x0000ff - pixel_at(291,363).should_be_of_color 0x00ffff - pixel_at(288,390).should_be_of_color 0x0000ff - pixel_at(285,412).should_be_of_color 0xffffff - pixel_at(285,437).should_be_of_color 0xff0000 - pixel_at(286,287).should_be_of_color 0x00ffff - pixel_at(265,287).should_be_of_color 0x0000ff - pixel_at(244,290).should_be_of_color 0xffffff - pixel_at(219,290).should_be_of_color 0x00ff00 - pixel_at(209,270).should_be_of_color 0xffff00 - pixel_at(238,266).should_be_of_color 0xff00ff - pixel_at(266,265).should_be_of_color 0x00ff00 - pixel_at(283,265).should_be_of_color 0x0000ff - pixel_at(289,236).should_be_of_color 0xffffff - pixel_at(264,237).should_be_of_color 0xff00ff - pixel_at(238,241).should_be_of_color 0x00ffff - pixel_at(216,235).should_be_of_color 0x0000ff - pixel_at(210,213).should_be_of_color 0xff00ff - pixel_at(238,213).should_be_of_color 0x0000ff - pixel_at(267,211).should_be_of_color 0xffff00 - pixel_at(287,211).should_be_of_color 0xff0000 - pixel_at(257,118).should_be_of_color 0x00ffff - pixel_at(262,96).should_be_of_color 0x0000ff - pixel_at(263,69).should_be_of_color 0xffffff - pixel_at(262,43).should_be_of_color 0xff0000 - pixel_at(285,41).should_be_of_color 0xffff00 - pixel_at(290,67).should_be_of_color 0xff00ff - pixel_at(288,92).should_be_of_color 0x00ff00 - pixel_at(285,115).should_be_of_color 0x0000ff - pixel_at(312,120).should_be_of_color 0xffffff - pixel_at(311,94).should_be_of_color 0xff00ff - pixel_at(310,69).should_be_of_color 0x00ffff - pixel_at(311,45).should_be_of_color 0x0000ff - pixel_at(335,44).should_be_of_color 0xff00ff - pixel_at(335,67).should_be_of_color 0x0000ff - pixel_at(337,94).should_be_of_color 0xffff00 - pixel_at(337,119).should_be_of_color 0x00ff00 - pixel_at(367,310).should_be_of_color 0xff00ff - pixel_at(390,290).should_be_of_color 0x0000ff - pixel_at(406,277).should_be_of_color 0xffff00 - pixel_at(426,260).should_be_of_color 0xff0000 - pixel_at(438,280).should_be_of_color 0xffffff - pixel_at(418,296).should_be_of_color 0xff00ff - pixel_at(404,308).should_be_of_color 0x00ffff - pixel_at(380,324).should_be_of_color 0x0000ff - pixel_at(401,344).should_be_of_color 0xffff00 - pixel_at(415,330).should_be_of_color 0xff00ff - pixel_at(434,314).should_be_of_color 0x00ff00 - pixel_at(451,301).should_be_of_color 0x0000ff - pixel_at(472,316).should_be_of_color 0x00ffff - pixel_at(452,333).should_be_of_color 0x0000ff - pixel_at(434,349).should_be_of_color 0xffffff - pixel_at(415,362).should_be_of_color 0x00ff00 - pixel_at(375,484).should_be_of_color 0xff00ff - pixel_at(360,518).should_be_of_color 0x0000ff - pixel_at(343,552).should_be_of_color 0xffff00 - pixel_at(334,585).should_be_of_color 0x00ff00 - pixel_at(379,574).should_be_of_color 0xffffff - pixel_at(392,538).should_be_of_color 0xff00ff - pixel_at(406,505).should_be_of_color 0x00ffff - pixel_at(420,472).should_be_of_color 0x0000ff - pixel_at(468,456).should_be_of_color 0xffff00 - pixel_at(455,496).should_be_of_color 0xff00ff - pixel_at(438,527).should_be_of_color 0x00ff00 - pixel_at(427,558).should_be_of_color 0x0000ff - pixel_at(515,443).should_be_of_color 0xff0000 - pixel_at(504,480).should_be_of_color 0xffffff - pixel_at(489,512).should_be_of_color 0x0000ff - pixel_at(477,547).should_be_of_color 0x00ffff - pixel_at(520,238).should_be_of_color 0xff0000 - pixel_at(503,222).should_be_of_color 0xffff00 - pixel_at(486,204).should_be_of_color 0x0000ff - pixel_at(463,187).should_be_of_color 0xff00ff - pixel_at(478,168).should_be_of_color 0x0000ff - pixel_at(500,148).should_be_of_color 0xffff00 - pixel_at(516,130).should_be_of_color 0x00ff00 - pixel_at(536,146).should_be_of_color 0xffffff - pixel_at(517,165).should_be_of_color 0xff00ff - pixel_at(501,187).should_be_of_color 0x00ffff - pixel_at(518,198).should_be_of_color 0xff00ff - pixel_at(533,183).should_be_of_color 0x00ff00 - pixel_at(551,163).should_be_of_color 0x0000ff - pixel_at(572,178).should_be_of_color 0x00ffff - pixel_at(553,197).should_be_of_color 0x0000ff - pixel_at(538,216).should_be_of_color 0xffffff - end + + convert_file "imagematrix.pdf" do + pixel_at(22,239).should_be_of_color 0xff00ff + pixel_at(45,240).should_be_of_color 0x0000ff + pixel_at(72,239).should_be_of_color 0xffff00 + pixel_at(98,236).should_be_of_color 0xff0000 + pixel_at(99,312).should_be_of_color 0xffffff + pixel_at(80,312).should_be_of_color 0xff00ff + pixel_at(46,312).should_be_of_color 0x00ffff + pixel_at(26,314).should_be_of_color 0x0000ff + pixel_at(21,385).should_be_of_color 0xffff00 + pixel_at(46,384).should_be_of_color 0xff00ff + pixel_at(71,384).should_be_of_color 0x00ff00 + pixel_at(95,383).should_be_of_color 0x0000ff + pixel_at(97,459).should_be_of_color 0x00ffff + pixel_at(75,460).should_be_of_color 0x0000ff + pixel_at(50,460).should_be_of_color 0xffffff + pixel_at(23,461).should_be_of_color 0x00ff00 + pixel_at(216,436).should_be_of_color 0xff00ff + pixel_at(213,415).should_be_of_color 0x0000ff + pixel_at(214,386).should_be_of_color 0xffff00 + pixel_at(216,360).should_be_of_color 0x00ff00 + pixel_at(234,364).should_be_of_color 0xffffff + pixel_at(235,388).should_be_of_color 0xff00ff + pixel_at(233,416).should_be_of_color 0x00ffff + pixel_at(237,431).should_be_of_color 0x0000ff + pixel_at(260,433).should_be_of_color 0xffff00 + pixel_at(263,414).should_be_of_color 0xff00ff + pixel_at(261,393).should_be_of_color 0x00ff00 + pixel_at(263,365).should_be_of_color 0x0000ff + pixel_at(291,363).should_be_of_color 0x00ffff + pixel_at(288,390).should_be_of_color 0x0000ff + pixel_at(285,412).should_be_of_color 0xffffff + pixel_at(285,437).should_be_of_color 0xff0000 + pixel_at(286,287).should_be_of_color 0x00ffff + pixel_at(265,287).should_be_of_color 0x0000ff + pixel_at(244,290).should_be_of_color 0xffffff + pixel_at(219,290).should_be_of_color 0x00ff00 + pixel_at(209,270).should_be_of_color 0xffff00 + pixel_at(238,266).should_be_of_color 0xff00ff + pixel_at(266,265).should_be_of_color 0x00ff00 + pixel_at(283,265).should_be_of_color 0x0000ff + pixel_at(289,236).should_be_of_color 0xffffff + pixel_at(264,237).should_be_of_color 0xff00ff + pixel_at(238,241).should_be_of_color 0x00ffff + pixel_at(216,235).should_be_of_color 0x0000ff + pixel_at(210,213).should_be_of_color 0xff00ff + pixel_at(238,213).should_be_of_color 0x0000ff + pixel_at(267,211).should_be_of_color 0xffff00 + pixel_at(287,211).should_be_of_color 0xff0000 + pixel_at(257,118).should_be_of_color 0x00ffff + pixel_at(262,96).should_be_of_color 0x0000ff + pixel_at(263,69).should_be_of_color 0xffffff + pixel_at(262,43).should_be_of_color 0xff0000 + pixel_at(285,41).should_be_of_color 0xffff00 + pixel_at(290,67).should_be_of_color 0xff00ff + pixel_at(288,92).should_be_of_color 0x00ff00 + pixel_at(285,115).should_be_of_color 0x0000ff + pixel_at(312,120).should_be_of_color 0xffffff + pixel_at(311,94).should_be_of_color 0xff00ff + pixel_at(310,69).should_be_of_color 0x00ffff + pixel_at(311,45).should_be_of_color 0x0000ff + pixel_at(335,44).should_be_of_color 0xff00ff + pixel_at(335,67).should_be_of_color 0x0000ff + pixel_at(337,94).should_be_of_color 0xffff00 + pixel_at(337,119).should_be_of_color 0x00ff00 + pixel_at(367,310).should_be_of_color 0xff00ff + pixel_at(390,290).should_be_of_color 0x0000ff + pixel_at(406,277).should_be_of_color 0xffff00 + pixel_at(426,260).should_be_of_color 0xff0000 + pixel_at(438,280).should_be_of_color 0xffffff + pixel_at(418,296).should_be_of_color 0xff00ff + pixel_at(404,308).should_be_of_color 0x00ffff + pixel_at(380,324).should_be_of_color 0x0000ff + pixel_at(401,344).should_be_of_color 0xffff00 + pixel_at(415,330).should_be_of_color 0xff00ff + pixel_at(434,314).should_be_of_color 0x00ff00 + pixel_at(451,301).should_be_of_color 0x0000ff + pixel_at(472,316).should_be_of_color 0x00ffff + pixel_at(452,333).should_be_of_color 0x0000ff + pixel_at(434,349).should_be_of_color 0xffffff + pixel_at(415,362).should_be_of_color 0x00ff00 + pixel_at(375,484).should_be_of_color 0xff00ff + pixel_at(360,518).should_be_of_color 0x0000ff + pixel_at(343,552).should_be_of_color 0xffff00 + pixel_at(334,585).should_be_of_color 0x00ff00 + pixel_at(379,574).should_be_of_color 0xffffff + pixel_at(392,538).should_be_of_color 0xff00ff + pixel_at(406,505).should_be_of_color 0x00ffff + pixel_at(420,472).should_be_of_color 0x0000ff + pixel_at(468,456).should_be_of_color 0xffff00 + pixel_at(455,496).should_be_of_color 0xff00ff + pixel_at(438,527).should_be_of_color 0x00ff00 + pixel_at(427,558).should_be_of_color 0x0000ff + pixel_at(515,443).should_be_of_color 0xff0000 + pixel_at(504,480).should_be_of_color 0xffffff + pixel_at(489,512).should_be_of_color 0x0000ff + pixel_at(477,547).should_be_of_color 0x00ffff + pixel_at(520,238).should_be_of_color 0xff0000 + pixel_at(503,222).should_be_of_color 0xffff00 + pixel_at(486,204).should_be_of_color 0x0000ff + pixel_at(463,187).should_be_of_color 0xff00ff + pixel_at(478,168).should_be_of_color 0x0000ff + pixel_at(500,148).should_be_of_color 0xffff00 + pixel_at(516,130).should_be_of_color 0x00ff00 + pixel_at(536,146).should_be_of_color 0xffffff + pixel_at(517,165).should_be_of_color 0xff00ff + pixel_at(501,187).should_be_of_color 0x00ffff + pixel_at(518,198).should_be_of_color 0xff00ff + pixel_at(533,183).should_be_of_color 0x00ff00 + pixel_at(551,163).should_be_of_color 0x0000ff + pixel_at(572,178).should_be_of_color 0x00ffff + pixel_at(553,197).should_be_of_color 0x0000ff + pixel_at(538,216).should_be_of_color 0xffffff + end end diff --git a/spec/layers.spec.rb b/spec/layers.spec.rb index 2594835..48cbe22 100644 --- a/spec/layers.spec.rb +++ b/spec/layers.spec.rb @@ -1,26 +1,27 @@ require File.dirname(__FILE__) + '/spec_helper' describe "pdf conversion" do - convert_file "layers.pdf" do - pixel_at(67,134).should_be_of_color 0x00ffff - pixel_at(299,182).should_be_of_color 0x00ffff - pixel_at(144,215).should_be_of_color 0x00ffff - pixel_at(206,203).should_be_of_color 0x00ffff - pixel_at(243,196).should_be_of_color 0x00ffff - pixel_at(270,190).should_be_of_color 0x00ffff - pixel_at(114,220).should_be_of_color 0x00ffff - pixel_at(406,161).should_be_of_color 0x00ffff - pixel_at(398,201).should_be_of_color 0x00ffff - pixel_at(438,211).should_be_of_color 0x0000ff - pixel_at(499,216).should_be_of_color 0xffff00 - pixel_at(498,223).should_be_of_color 0x00ffff - pixel_at(515,175).should_be_of_color 0xffff00 - pixel_at(458,185).should_be_of_color 0x0000ff - pixel_at(541,138).should_be_of_color 0xffff00 - pixel_at(433,158).should_be_of_color 0x0000ff - area_at(431,155,485,212).should_be_plain_colored - pixel_at(103,184).should_be_of_color 0x000000 - pixel_at(505,84).should_be_of_color 0xffff00 - pixel_at(314,149).should_be_of_color 0xffffff - end + + convert_file "layers.pdf" do + pixel_at(67,134).should_be_of_color 0x00ffff + pixel_at(299,182).should_be_of_color 0x00ffff + pixel_at(144,215).should_be_of_color 0x00ffff + pixel_at(206,203).should_be_of_color 0x00ffff + pixel_at(243,196).should_be_of_color 0x00ffff + pixel_at(270,190).should_be_of_color 0x00ffff + pixel_at(114,220).should_be_of_color 0x00ffff + pixel_at(406,161).should_be_of_color 0x00ffff + pixel_at(398,201).should_be_of_color 0x00ffff + pixel_at(438,211).should_be_of_color 0x0000ff + pixel_at(499,216).should_be_of_color 0xffff00 + pixel_at(498,223).should_be_of_color 0x00ffff + pixel_at(515,175).should_be_of_color 0xffff00 + pixel_at(458,185).should_be_of_color 0x0000ff + pixel_at(541,138).should_be_of_color 0xffff00 + pixel_at(433,158).should_be_of_color 0x0000ff + area_at(431,155,485,212).should_be_plain_colored + pixel_at(103,184).should_be_of_color 0x000000 + pixel_at(505,84).should_be_of_color 0xffff00 + pixel_at(314,149).should_be_of_color 0xffffff + end end diff --git a/spec/links.spec.rb b/spec/links.spec.rb index 35f92cc..4e75d0e 100644 --- a/spec/links.spec.rb +++ b/spec/links.spec.rb @@ -1,8 +1,9 @@ require File.dirname(__FILE__) + '/spec_helper' describe "pdf conversion" do - convert_file "links.pdf" do - area_at(0,0,200,200).should_contain_link("http://www.swftools.org") - area_at(0,0,200,200).should_contain_link("http://www.quiss.org") - end + + convert_file "links.pdf" do + area_at(0,0,200,200).should_contain_link("http://www.swftools.org") + area_at(0,0,200,200).should_contain_link("http://www.quiss.org") + end end diff --git a/spec/miterlimit.spec.rb b/spec/miterlimit.spec.rb index 6241ab9..2e1fa6f 100644 --- a/spec/miterlimit.spec.rb +++ b/spec/miterlimit.spec.rb @@ -1,21 +1,22 @@ require File.dirname(__FILE__) + '/spec_helper' describe "pdf conversion" do - convert_file "miterlimit.pdf" do - pixel_at(451,153).should_be_of_color 0x999999 - pixel_at(492,154).should_be_of_color 0x666666 - pixel_at(523,153).should_be_of_color 0x666666 - pixel_at(386,151).should_be_of_color 0x666666 - pixel_at(86,65).should_be_of_color 0x666666 - pixel_at(80,77).should_be_of_color 0x999999 - pixel_at(77,86).should_be_of_color 0x666666 - pixel_at(474,380).should_be_of_color 0xffffff - pixel_at(492,380).should_be_of_color 0xffffff - pixel_at(452,381).should_be_of_color 0x999999 - pixel_at(450,369).should_be_of_color 0x666666 - pixel_at(376,382).should_be_of_color 0x666666 - pixel_at(89,319).should_be_of_color 0x666666 - pixel_at(119,314).should_be_of_color 0x999999 - pixel_at(142,305).should_be_of_color 0x666666 - end + + convert_file "miterlimit.pdf" do + pixel_at(451,153).should_be_of_color 0x999999 + pixel_at(492,154).should_be_of_color 0x666666 + pixel_at(523,153).should_be_of_color 0x666666 + pixel_at(386,151).should_be_of_color 0x666666 + pixel_at(86,65).should_be_of_color 0x666666 + pixel_at(80,77).should_be_of_color 0x999999 + pixel_at(77,86).should_be_of_color 0x666666 + pixel_at(474,380).should_be_of_color 0xffffff + pixel_at(492,380).should_be_of_color 0xffffff + pixel_at(452,381).should_be_of_color 0x999999 + pixel_at(450,369).should_be_of_color 0x666666 + pixel_at(376,382).should_be_of_color 0x666666 + pixel_at(89,319).should_be_of_color 0x666666 + pixel_at(119,314).should_be_of_color 0x999999 + pixel_at(142,305).should_be_of_color 0x666666 + end end diff --git a/spec/pattern.spec.rb b/spec/pattern.spec.rb index fb8636b..c604044 100644 --- a/spec/pattern.spec.rb +++ b/spec/pattern.spec.rb @@ -1,8 +1,9 @@ require File.dirname(__FILE__) + '/spec_helper' describe "pdf conversion" do - convert_file "pattern.pdf" do - area_at(425,190,500,224).should_not_be_plain_colored - area_at(517,192,583,225).should_be_plain_colored - end + + convert_file "pattern.pdf" do + area_at(425,190,500,224).should_not_be_plain_colored + area_at(517,192,583,225).should_be_plain_colored + end end diff --git a/spec/simpletext.spec.rb b/spec/simpletext.spec.rb index 874ce59..4ff96b8 100644 --- a/spec/simpletext.spec.rb +++ b/spec/simpletext.spec.rb @@ -1,13 +1,14 @@ require File.dirname(__FILE__) + '/spec_helper' -describe "pdf conversion" do - convert_file "simpletext.pdf" do - pixel_at(109,133).should_be_of_color 0x000000 - pixel_at(154,139).should_be_brighter_than pixel_at(151,139) - pixel_at(53,136).should_be_darker_than pixel_at(58,166) - pixel_at(97,164).should_be_the_same_as pixel_at(208,256) - area_at(215,80,333,156).should_be_plain_colored - area_at(46,126,180,158).should_not_be_plain_colored - area_at(38,118,170,152).should_contain_text 'Hello World' - end +describe "pdf conversion" do + + convert_file "simpletext.pdf" do + pixel_at(109,133).should_be_of_color 0x000000 + pixel_at(154,139).should_be_brighter_than pixel_at(151,139) + pixel_at(53,136).should_be_darker_than pixel_at(58,166) + pixel_at(97,164).should_be_the_same_as pixel_at(208,256) + area_at(215,80,333,156).should_be_plain_colored + area_at(46,126,180,158).should_not_be_plain_colored + area_at(38,118,170,152).should_contain_text 'Hello World' + end end diff --git a/spec/smalltext.spec.rb b/spec/smalltext.spec.rb index eb65646..aee2b24 100644 --- a/spec/smalltext.spec.rb +++ b/spec/smalltext.spec.rb @@ -1,15 +1,16 @@ require File.dirname(__FILE__) + '/spec_helper' describe "pdf conversion" do - convert_file "smalltext.pdf" do - area_at(37,93,44,103).should_not_be_plain_colored - area_at(77,94,86,104).should_not_be_plain_colored - area_at(117,94,123,104).should_not_be_plain_colored - area_at(157,94,165,103).should_not_be_plain_colored - area_at(37,139,45,155).should_not_be_plain_colored - area_at(76,139,85,154).should_not_be_plain_colored - area_at(116,142,125,152).should_not_be_plain_colored - area_at(155,145,167,151).should_not_be_plain_colored - area_at(27,110,180,115).should_be_plain_colored - end + + convert_file "smalltext.pdf" do + area_at(37,93,44,103).should_not_be_plain_colored + area_at(77,94,86,104).should_not_be_plain_colored + area_at(117,94,123,104).should_not_be_plain_colored + area_at(157,94,165,103).should_not_be_plain_colored + area_at(37,139,45,155).should_not_be_plain_colored + area_at(76,139,85,154).should_not_be_plain_colored + area_at(116,142,125,152).should_not_be_plain_colored + area_at(155,145,167,151).should_not_be_plain_colored + area_at(27,110,180,115).should_be_plain_colored + end end diff --git a/spec/textarea.spec.rb b/spec/textarea.spec.rb index dcaeea6..df269d7 100644 --- a/spec/textarea.spec.rb +++ b/spec/textarea.spec.rb @@ -1,10 +1,11 @@ require File.dirname(__FILE__) + '/spec_helper' describe "pdf conversion" do - convert_file "textarea.pdf" do - area_at(460,94,610,106).should_contain_text '97924ff65f9dfc75450ba' - area_at(467,373,525,384).should_contain_text '29cf24e47' - area_at(474,592,543,601).should_contain_text '0afa27099a' - area_at(59,798,131,808).should_contain_text '4c28e489b4' - end + + convert_file "textarea.pdf" do + area_at(460,94,610,106).should_contain_text '97924ff65f9dfc75450ba' + area_at(467,373,525,384).should_contain_text '29cf24e47' + area_at(474,592,543,601).should_contain_text '0afa27099a' + area_at(59,798,131,808).should_contain_text '4c28e489b4' + end end diff --git a/spec/textposition.spec.rb b/spec/textposition.spec.rb index 73e1103..5a3ee86 100644 --- a/spec/textposition.spec.rb +++ b/spec/textposition.spec.rb @@ -1,126 +1,127 @@ require File.dirname(__FILE__) + '/spec_helper' describe "pdf conversion" do - convert_file "textposition.pdf" do - pixel_at(109,352).should_be_of_color 0xffffff - pixel_at(115,346).should_be_of_color 0xffffff - pixel_at(132,368).should_be_of_color 0xffffff - pixel_at(141,375).should_be_of_color 0xffffff - pixel_at(149,380).should_be_of_color 0xffffff - pixel_at(156,386).should_be_of_color 0xffffff - pixel_at(176,403).should_be_of_color 0xffffff - pixel_at(189,409).should_be_of_color 0xffffff - pixel_at(196,421).should_be_of_color 0xffffff - pixel_at(204,428).should_be_of_color 0xffffff - pixel_at(16,164).should_be_of_color 0x000000 - pixel_at(28,167).should_be_of_color 0x000000 - pixel_at(30,152).should_be_of_color 0xffffff - pixel_at(29,139).should_be_of_color 0x000000 - pixel_at(42,194).should_be_of_color 0x000000 - pixel_at(42,182).should_be_of_color 0xffffff - pixel_at(28,196).should_be_of_color 0x000000 - pixel_at(31,183).should_be_of_color 0xffffff - pixel_at(50,193).should_be_of_color 0x000000 - pixel_at(52,183).should_be_of_color 0xffffff - pixel_at(63,194).should_be_of_color 0x000000 - pixel_at(63,178).should_be_of_color 0xffffff - pixel_at(63,149).should_be_of_color 0xffffff - pixel_at(62,139).should_be_of_color 0x000000 - pixel_at(99,141).should_be_of_color 0x000000 - pixel_at(98,171).should_be_of_color 0xffffff - pixel_at(99,194).should_be_of_color 0x000000 - pixel_at(113,168).should_be_of_color 0x000000 - pixel_at(113,152).should_be_of_color 0xffffff - pixel_at(113,189).should_be_of_color 0xffffff - pixel_at(126,169).should_be_of_color 0xffffff - pixel_at(136,167).should_be_of_color 0xffffff - pixel_at(135,195).should_be_of_color 0x000000 - pixel_at(125,194).should_be_of_color 0x000000 - pixel_at(135,141).should_be_of_color 0x000000 - pixel_at(113,141).should_be_of_color 0x000000 - pixel_at(74,169).should_be_of_color 0xffffff - pixel_at(310,437).should_be_of_color 0x000000 - pixel_at(313,442).should_be_of_color 0xffffff - pixel_at(320,430).should_be_of_color 0xffffff - pixel_at(363,423).should_be_of_color 0xffffff - pixel_at(383,419).should_be_of_color 0xffffff - pixel_at(405,413).should_be_of_color 0xffffff - pixel_at(416,407).should_be_of_color 0x000000 - pixel_at(435,404).should_be_of_color 0x000000 - pixel_at(458,403).should_be_of_color 0xffffff - pixel_at(474,394).should_be_of_color 0xffffff - pixel_at(489,385).should_be_of_color 0xffffff - pixel_at(499,393).should_be_of_color 0xffffff - pixel_at(525,381).should_be_of_color 0xffffff - pixel_at(545,376).should_be_of_color 0xffffff - pixel_at(415,278).should_be_of_color 0xffffff - pixel_at(409,271).should_be_of_color 0xffffff - pixel_at(432,256).should_be_of_color 0xffffff - pixel_at(440,250).should_be_of_color 0xffffff - pixel_at(449,243).should_be_of_color 0xffffff - pixel_at(458,237).should_be_of_color 0xffffff - pixel_at(472,228).should_be_of_color 0xffffff - pixel_at(476,221).should_be_of_color 0xffffff - pixel_at(489,214).should_be_of_color 0xffffff - pixel_at(497,202).should_be_of_color 0xffffff - pixel_at(504,196).should_be_of_color 0xffffff - pixel_at(243,262).should_be_of_color 0xffffff - pixel_at(242,255).should_be_of_color 0xffffff - pixel_at(253,257).should_be_of_color 0xffffff - pixel_at(129,370).should_be_of_color 0xffffff - pixel_at(367,419).should_be_of_color 0xffffff - pixel_at(387,412).should_be_of_color 0xffffff - pixel_at(232,188).should_be_of_color 0xffffff - pixel_at(233,262).should_be_of_color 0xffffff - pixel_at(207,253).should_be_of_color 0xffffff - pixel_at(264,254).should_be_of_color 0xffffff - pixel_at(290,256).should_be_of_color 0xffffff - pixel_at(303,252).should_be_of_color 0xffffff - pixel_at(317,256).should_be_of_color 0xffffff - pixel_at(326,256).should_be_of_color 0xffffff - pixel_at(317,188).should_be_of_color 0xffffff - pixel_at(325,193).should_be_of_color 0xffffff - pixel_at(289,193).should_be_of_color 0xffffff - pixel_at(252,194).should_be_of_color 0xffffff - pixel_at(206,197).should_be_of_color 0xffffff - pixel_at(206,188).should_be_of_color 0xffffff - pixel_at(222,123).should_be_of_color 0xffffff - pixel_at(231,118).should_be_of_color 0xffffff - pixel_at(245,128).should_be_of_color 0xffffff - pixel_at(260,124).should_be_of_color 0xffffff - pixel_at(285,124).should_be_of_color 0xffffff - pixel_at(295,123).should_be_of_color 0xffffff - pixel_at(305,118).should_be_of_color 0xffffff - pixel_at(316,118).should_be_of_color 0xffffff - pixel_at(343,128).should_be_of_color 0xffffff - pixel_at(343,118).should_be_of_color 0xffffff - pixel_at(303,198).should_be_of_color 0xffffff - pixel_at(43,136).should_be_of_color 0xffffff - pixel_at(53,135).should_be_of_color 0xffffff - area_at(17,177,76,197).should_not_be_plain_colored - area_at(74,134,141,162).should_not_be_plain_colored - area_at(77,173,141,196).should_not_be_plain_colored - area_at(219,119,346,128).should_not_be_plain_colored - area_at(110,347,117,354).should_not_be_plain_colored - area_at(129,366,138,373).should_not_be_plain_colored - area_at(139,373,149,381).should_not_be_plain_colored - area_at(166,396,176,403).should_not_be_plain_colored - area_at(187,413,197,420).should_not_be_plain_colored - area_at(199,422,208,429).should_not_be_plain_colored - area_at(317,430,347,434).should_not_be_plain_colored - area_at(353,420,382,425).should_not_be_plain_colored - area_at(396,408,427,414).should_not_be_plain_colored - area_at(430,400,461,404).should_not_be_plain_colored - area_at(478,389,503,395).should_not_be_plain_colored - area_at(513,381,539,385).should_not_be_plain_colored - area_at(203,189,330,197).should_not_be_plain_colored - area_at(204,253,331,261).should_not_be_plain_colored - area_at(410,271,415,277).should_not_be_plain_colored - area_at(423,261,428,266).should_not_be_plain_colored - area_at(440,246,445,257).should_not_be_plain_colored - area_at(460,228,465,235).should_not_be_plain_colored - area_at(475,217,483,223).should_not_be_plain_colored - area_at(489,206,493,212).should_not_be_plain_colored - area_at(502,197,505,202).should_not_be_plain_colored - end + + convert_file "textposition.pdf" do + pixel_at(109,352).should_be_of_color 0xffffff + pixel_at(115,346).should_be_of_color 0xffffff + pixel_at(132,368).should_be_of_color 0xffffff + pixel_at(141,375).should_be_of_color 0xffffff + pixel_at(149,380).should_be_of_color 0xffffff + pixel_at(156,386).should_be_of_color 0xffffff + pixel_at(176,403).should_be_of_color 0xffffff + pixel_at(189,409).should_be_of_color 0xffffff + pixel_at(196,421).should_be_of_color 0xffffff + pixel_at(204,428).should_be_of_color 0xffffff + pixel_at(16,164).should_be_of_color 0x000000 + pixel_at(28,167).should_be_of_color 0x000000 + pixel_at(30,152).should_be_of_color 0xffffff + pixel_at(29,139).should_be_of_color 0x000000 + pixel_at(42,194).should_be_of_color 0x000000 + pixel_at(42,182).should_be_of_color 0xffffff + pixel_at(28,196).should_be_of_color 0x000000 + pixel_at(31,183).should_be_of_color 0xffffff + pixel_at(50,193).should_be_of_color 0x000000 + pixel_at(52,183).should_be_of_color 0xffffff + pixel_at(63,194).should_be_of_color 0x000000 + pixel_at(63,178).should_be_of_color 0xffffff + pixel_at(63,149).should_be_of_color 0xffffff + pixel_at(62,139).should_be_of_color 0x000000 + pixel_at(99,141).should_be_of_color 0x000000 + pixel_at(98,171).should_be_of_color 0xffffff + pixel_at(99,194).should_be_of_color 0x000000 + pixel_at(113,168).should_be_of_color 0x000000 + pixel_at(113,152).should_be_of_color 0xffffff + pixel_at(113,189).should_be_of_color 0xffffff + pixel_at(126,169).should_be_of_color 0xffffff + pixel_at(136,167).should_be_of_color 0xffffff + pixel_at(135,195).should_be_of_color 0x000000 + pixel_at(125,194).should_be_of_color 0x000000 + pixel_at(135,141).should_be_of_color 0x000000 + pixel_at(113,141).should_be_of_color 0x000000 + pixel_at(74,169).should_be_of_color 0xffffff + pixel_at(310,437).should_be_of_color 0x000000 + pixel_at(313,442).should_be_of_color 0xffffff + pixel_at(320,430).should_be_of_color 0xffffff + pixel_at(363,423).should_be_of_color 0xffffff + pixel_at(383,419).should_be_of_color 0xffffff + pixel_at(405,413).should_be_of_color 0xffffff + pixel_at(416,407).should_be_of_color 0x000000 + pixel_at(435,404).should_be_of_color 0x000000 + pixel_at(458,403).should_be_of_color 0xffffff + pixel_at(474,394).should_be_of_color 0xffffff + pixel_at(489,385).should_be_of_color 0xffffff + pixel_at(499,393).should_be_of_color 0xffffff + pixel_at(525,381).should_be_of_color 0xffffff + pixel_at(545,376).should_be_of_color 0xffffff + pixel_at(415,278).should_be_of_color 0xffffff + pixel_at(409,271).should_be_of_color 0xffffff + pixel_at(432,256).should_be_of_color 0xffffff + pixel_at(440,250).should_be_of_color 0xffffff + pixel_at(449,243).should_be_of_color 0xffffff + pixel_at(458,237).should_be_of_color 0xffffff + pixel_at(472,228).should_be_of_color 0xffffff + pixel_at(476,221).should_be_of_color 0xffffff + pixel_at(489,214).should_be_of_color 0xffffff + pixel_at(497,202).should_be_of_color 0xffffff + pixel_at(504,196).should_be_of_color 0xffffff + pixel_at(243,262).should_be_of_color 0xffffff + pixel_at(242,255).should_be_of_color 0xffffff + pixel_at(253,257).should_be_of_color 0xffffff + pixel_at(129,370).should_be_of_color 0xffffff + pixel_at(367,419).should_be_of_color 0xffffff + pixel_at(387,412).should_be_of_color 0xffffff + pixel_at(232,188).should_be_of_color 0xffffff + pixel_at(233,262).should_be_of_color 0xffffff + pixel_at(207,253).should_be_of_color 0xffffff + pixel_at(264,254).should_be_of_color 0xffffff + pixel_at(290,256).should_be_of_color 0xffffff + pixel_at(303,252).should_be_of_color 0xffffff + pixel_at(317,256).should_be_of_color 0xffffff + pixel_at(326,256).should_be_of_color 0xffffff + pixel_at(317,188).should_be_of_color 0xffffff + pixel_at(325,193).should_be_of_color 0xffffff + pixel_at(289,193).should_be_of_color 0xffffff + pixel_at(252,194).should_be_of_color 0xffffff + pixel_at(206,197).should_be_of_color 0xffffff + pixel_at(206,188).should_be_of_color 0xffffff + pixel_at(222,123).should_be_of_color 0xffffff + pixel_at(231,118).should_be_of_color 0xffffff + pixel_at(245,128).should_be_of_color 0xffffff + pixel_at(260,124).should_be_of_color 0xffffff + pixel_at(285,124).should_be_of_color 0xffffff + pixel_at(295,123).should_be_of_color 0xffffff + pixel_at(305,118).should_be_of_color 0xffffff + pixel_at(316,118).should_be_of_color 0xffffff + pixel_at(343,128).should_be_of_color 0xffffff + pixel_at(343,118).should_be_of_color 0xffffff + pixel_at(303,198).should_be_of_color 0xffffff + pixel_at(43,136).should_be_of_color 0xffffff + pixel_at(53,135).should_be_of_color 0xffffff + area_at(17,177,76,197).should_not_be_plain_colored + area_at(74,134,141,162).should_not_be_plain_colored + area_at(77,173,141,196).should_not_be_plain_colored + area_at(219,119,346,128).should_not_be_plain_colored + area_at(110,347,117,354).should_not_be_plain_colored + area_at(129,366,138,373).should_not_be_plain_colored + area_at(139,373,149,381).should_not_be_plain_colored + area_at(166,396,176,403).should_not_be_plain_colored + area_at(187,413,197,420).should_not_be_plain_colored + area_at(199,422,208,429).should_not_be_plain_colored + area_at(317,430,347,434).should_not_be_plain_colored + area_at(353,420,382,425).should_not_be_plain_colored + area_at(396,408,427,414).should_not_be_plain_colored + area_at(430,400,461,404).should_not_be_plain_colored + area_at(478,389,503,395).should_not_be_plain_colored + area_at(513,381,539,385).should_not_be_plain_colored + area_at(203,189,330,197).should_not_be_plain_colored + area_at(204,253,331,261).should_not_be_plain_colored + area_at(410,271,415,277).should_not_be_plain_colored + area_at(423,261,428,266).should_not_be_plain_colored + area_at(440,246,445,257).should_not_be_plain_colored + area_at(460,228,465,235).should_not_be_plain_colored + area_at(475,217,483,223).should_not_be_plain_colored + area_at(489,206,493,212).should_not_be_plain_colored + area_at(502,197,505,202).should_not_be_plain_colored + end end diff --git a/spec/textselectspaces.spec.rb b/spec/textselectspaces.spec.rb index 8e126a5..2299b9c 100644 --- a/spec/textselectspaces.spec.rb +++ b/spec/textselectspaces.spec.rb @@ -1,7 +1,8 @@ require File.dirname(__FILE__) + '/spec_helper' describe "pdf conversion" do - convert_file "textselectspaces.pdf" do + + convert_file "textselectspaces.pdf" do area_at(32,22,257,46).should_contain_text 'The quick brown fox' area_at(32,53,226,77).should_contain_text 'The quick brown fox' area_at(31,84,198,108).should_contain_text 'Thequickbrownfox' diff --git a/spec/transpstack.spec.rb b/spec/transpstack.spec.rb index 8f6226f..8219f1d 100644 --- a/spec/transpstack.spec.rb +++ b/spec/transpstack.spec.rb @@ -1,7 +1,8 @@ require File.dirname(__FILE__) + '/spec_helper' describe "pdf conversion" do - convert_file "transpstack.pdf" do + + convert_file "transpstack.pdf" do pixel_at(15,15).should_be_of_color 0xffffff pixel_at(4,50).should_be_of_color 0xff0000 pixel_at(21,52).should_be_of_color 0x00ff00