prawn-html 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module PrawnHtml
4
- module Callbacks
5
- class Highlight
6
- DEF_HIGHLIGHT = 'ffff00'
7
-
8
- def initialize(pdf, item)
9
- @pdf = pdf
10
- @color = item.delete(:background) || DEF_HIGHLIGHT
11
- end
12
-
13
- def render_behind(fragment)
14
- original_color = @pdf.fill_color
15
- @pdf.fill_color = @color
16
- @pdf.fill_rectangle(fragment.top_left, fragment.width, fragment.height)
17
- @pdf.fill_color = original_color
18
- end
19
- end
20
- end
21
- end