Class: Tabula::Extraction::LineExtractor::CloseFillNonZeroAndStrokePathOperator
- Inherits:
-
OperatorProcessor
- Object
- OperatorProcessor
- Tabula::Extraction::LineExtractor::CloseFillNonZeroAndStrokePathOperator
- Defined in:
- lib/tabula/pdf_line_extractor.rb
Instance Method Summary collapse
Instance Method Details
#process(operator, arguments) ⇒ Object
153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/tabula/pdf_line_extractor.rb', line 153 def process(operator, arguments) drawer = self.context fillColorComps = drawer.getGraphicsState.getNonStrokingColor.getJavaColor.getRGBColorComponents(nil) color_filter = drawer.[:line_color_filter] || lambda{|c| true } #by default, use all lines, regardless of color if color_filter.call(fillColorComps) drawer.currentPath.each { |segment| drawer.addRuling(segment, fillColorComps.to_a) } end drawer.currentPath = [] end |