test/hexapdf/layout/test_text_box.rb in hexapdf-0.45.0 vs test/hexapdf/layout/test_text_box.rb in hexapdf-0.46.0
- old
+ new
@@ -176,28 +176,25 @@
box.draw(@canvas, 0, 0)
assert_operators(@canvas.contents, [[:save_graphics_state],
[:restore_graphics_state],
[:save_graphics_state],
- [:concatenate_matrix, [1, 0, 0, 1, 5, 10]],
- [:save_graphics_state],
- [:append_rectangle, [0, 0, 10, 10]],
+ [:append_rectangle, [5, 10, 10, 10]],
[:clip_path_non_zero],
[:end_path],
- [:append_rectangle, [0.5, 0.5, 9.0, 9.0]],
+ [:append_rectangle, [5.5, 10.5, 9.0, 9.0]],
[:stroke_path],
[:restore_graphics_state],
- [:restore_graphics_state],
[:save_graphics_state],
[:restore_graphics_state]])
end
it "correctly draws borders, backgrounds... for position :flow" do
@frame.remove_area(Geom2D::Rectangle(0, 0, 40, 100))
box = create_box([@inline_box], style: {position: :flow, border: {width: 1}})
box.fit(60, 100, @frame)
- box.draw(@canvas, 0, 88)
+ box.draw(@canvas, 40, 88)
assert_operators(@canvas.contents, [[:save_graphics_state],
[:append_rectangle, [40, 88, 12, 12]],
[:clip_path_non_zero],
[:end_path],
[:append_rectangle, [40.5, 88.5, 11.0, 11.0]],
@@ -205,12 +202,9 @@
[:restore_graphics_state],
[:save_graphics_state],
[:restore_graphics_state],
[:save_graphics_state],
[:concatenate_matrix, [1, 0, 0, 1, 41, 89]],
- [:save_graphics_state],
- [:concatenate_matrix, [1, 0, 0, 1, 0, 0]],
- [:restore_graphics_state],
[:restore_graphics_state],
[:save_graphics_state],
[:restore_graphics_state]])
end