class PrawnHtml::PdfWrapper

def draw_rectangle(x:, y:, width:, height:, color:)

Parameters:
  • color (String) -- fill color
  • height (Float) -- height of the rectangle
  • width (Float) -- width of the rectangle
  • y (Float) -- top position of the rectangle
  • x (Float) -- left position of the rectangle
def draw_rectangle(x:, y:, width:, height:, color:)
  current_fill_color = pdf.fill_color
  pdf.fill_color = color
  pdf.fill_rectangle([y, x], width, height)
  pdf.fill_color = current_fill_color
end