Skip to content

Commit

Permalink
Remove column_box, padded_box, and lazy_bounding_box
Browse files Browse the repository at this point in the history
  • Loading branch information
practicingruby committed Apr 17, 2010
1 parent 82b09e9 commit 6859c53
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 316 deletions.
43 changes: 0 additions & 43 deletions examples/column_box/column_box_example.rb

This file was deleted.

27 changes: 0 additions & 27 deletions examples/page_layout/lazy_bounding_boxes.rb

This file was deleted.

23 changes: 0 additions & 23 deletions examples/page_layout/padded_box.rb

This file was deleted.

1 change: 0 additions & 1 deletion lib/prawn/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
require "stringio"
require "prawn/document/page_geometry"
require "prawn/document/bounding_box"
require "prawn/document/column_box"
require "prawn/document/internals"
require "prawn/document/snapshot"
require "prawn/document/graphics_state"
Expand Down
16 changes: 16 additions & 0 deletions lib/prawn/document/bounding_box.rb
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,22 @@ def height
@stretched_height = [(absolute_top - @parent.y), @stretched_height.to_f].max
end

# an alias for absolute_left
def left_side
absolute_left
end

# an alias for absolute_right
def right_side
absolute_right
end

# starts a new page
def move_past_bottom
@parent.start_new_page
end


alias_method :update_height, :height

# Returns +false+ when the box has a defined height, +true+ when the height
Expand Down
114 changes: 0 additions & 114 deletions lib/prawn/document/column_box.rb

This file was deleted.

1 change: 0 additions & 1 deletion lib/prawn/layout.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "prawn/table"
require "prawn/layout/page"
require 'prawn/layout/grid'

module Prawn
Expand Down
76 changes: 0 additions & 76 deletions lib/prawn/layout/page.rb

This file was deleted.

18 changes: 0 additions & 18 deletions spec/document_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -332,24 +332,6 @@
end.render
}.should.raise(Prawn::Errors::CannotGroup)
end

it "should group within individual column boxes" do
pdf = Prawn::Document.new do
# Set up columns with grouped blocks of 0..49. 0 to 49 is slightly short
# of the height of one page / column, so each column should get its own
# group (every column should start with zero).
column_box([0, bounds.top], :width => bounds.width, :columns => 7) do
10.times do
group { 50.times { |i| text(i.to_s) } }
end
end
end

# Second page should start with a 0 because it's a new group.
pages = PDF::Inspector::Page.analyze(pdf.render).pages
pages.size.should == 2
pages[1][:strings].first.should == '0'
end
end

describe "The render() feature" do
Expand Down
13 changes: 0 additions & 13 deletions spec/table_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -579,18 +579,5 @@

end

describe "in a column box" do
it "should flow to the next column, not the next page" do
pdf = Prawn::Document.new do
column_box [0, cursor], :width => bounds.width, :columns => 2 do
# 35 rows fit on two columns but not one
table [["data"]] * 35
end
end

pdf.page_count.should == 1
end
end

end

0 comments on commit 6859c53

Please sign in to comment.