Sha256: ff77b83ef61b94a5e3b92877fac470b7c6f5c89b69c81d0184c0581045fa94a9
Contents?: true
Size: 1.72 KB
Versions: 9
Compression:
Stored size: 1.72 KB
Contents
module PDF class Inspector module Graphics class Line < Inspector attr_accessor :points, :widths def initialize @points = [] @widths = [] end def append_line(*params) @points << params end def begin_new_subpath(*params) @points << params end def set_line_width(params) @widths << params end end class Rectangle < Inspector attr_reader :rectangles def initialize @rectangles = [] end def append_rectangle(*params) @rectangles << { :point => params[0..1], :width => params[2], :height => params[3] } end end class Curve < Inspector attr_reader :coords def initialize @coords = [] end def begin_new_subpath(*params) @coords += params end def append_curved_segment(*params) @coords += params end end class Color < Inspector attr_reader :stroke_color, :fill_color, :stroke_color_count, :fill_color_count def initialize @stroke_color_count = 0 @fill_color_count = 0 end def set_rgb_color_for_stroking(*params) @stroke_color_count += 1 @stroke_color = params end def set_rgb_color_for_nonstroking(*params) @fill_color_count += 1 @fill_color = params end end end end end
Version data entries
9 entries across 9 versions & 2 rubygems