Ruby on rails 无法在对虾中绘制边界框边框
如何使用特定设置在边界框周围绘制边框Ruby on rails 无法在对虾中绘制边界框边框,ruby-on-rails,ruby,prawn,Ruby On Rails,Ruby,Prawn,如何使用特定设置在边界框周围绘制边框 bounding_box([175, starting_y - 190], :width => 30.mm, :height => 17.mm) do stroke_color 'FFFF00' dash 10, space: 4 stroke_bounds end 我想有边界点为底部单独,我将如何有这个 我试着在stroke,stroke_bounds,bounding_box of prawn文档中搜索,我找不到任何东西你可以分
bounding_box([175, starting_y - 190], :width => 30.mm, :height => 17.mm) do
stroke_color 'FFFF00'
dash 10, space: 4
stroke_bounds
end
我想有边界点为底部单独,我将如何有这个
我试着在stroke,stroke_bounds,bounding_box of prawn文档中搜索,我找不到任何东西你可以分别画线:
require "prawn"
Prawn::Document.generate("bbox.pdf") do
x = 175
y = 200
width = 100
height = 50
color = 'FFFF00'
stroke do
stroke_color color
vertical_line y, y+height, :at => x
vertical_line y, y+height, :at => x+width
horizontal_line x, x+width, :at => y+height
end
stroke do
stroke_color color
dash 10, space: 4
horizontal_line x, x+width, :at => y
end
end
它输出
您想要一条虚线,还是三条连续线和一条虚线?