Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 用对虾抚摸包围盒_Ruby_Prawn - Fatal编程技术网

Ruby 用对虾抚摸包围盒

Ruby 用对虾抚摸包围盒,ruby,prawn,Ruby,Prawn,我有一些可变长度的文本,我正在插入一个对虾边界框。根据文本的长度,结果将是任意长度的页面,每个页面都有一个边框。我要抚摸每个边界框。我可以画出第一个盒子和最后一个盒子,但是不知道如何在中间画出…… bounding_box([0, 500], :width => 200, :height => 150) do stroke_bounds # This will stroke the first box text "This text will fill up ma

我有一些可变长度的文本,我正在插入一个对虾边界框。根据文本的长度,结果将是任意长度的页面,每个页面都有一个边框。我要抚摸每个边界框。我可以画出第一个盒子和最后一个盒子,但是不知道如何在中间画出……

  bounding_box([0, 500], :width => 200, :height => 150) do
    stroke_bounds # This will stroke the first box
    text "This text will fill up many boxes. " * 100
    stroke_bounds # This will stroke the last box
  end