prawn-html 0.3.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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