class PrawnStyledText::StrikeThroughCallback
Public Class Methods
new(pdf)
click to toggle source
# File lib/prawn-styled-text/callbacks.rb, line 22 def initialize(pdf) @document = pdf end
Public Instance Methods
render_in_front(fragment)
click to toggle source
# File lib/prawn-styled-text/callbacks.rb, line 26 def render_in_front(fragment) y = (fragment.top_left[1] + fragment.bottom_left[1]) / 2 @document.stroke do @document.line [fragment.top_left[0], y], [fragment.top_right[0], y] end end