Class: Happo::SnapshotComparisonImage::Before
- Defined in:
- lib/happo/snapshot_comparison_image/before.rb
Overview
This subclass of ‘SnapshotComparisonImage` knows how to draw the representation of the “before” image.
Constant Summary
Constants inherited from Base
Happo::SnapshotComparisonImage::Base::BASE_ALPHA, Happo::SnapshotComparisonImage::Base::BASE_DIFF_ALPHA, Happo::SnapshotComparisonImage::Base::BASE_OPACITY, Happo::SnapshotComparisonImage::Base::GREEN, Happo::SnapshotComparisonImage::Base::MAGENTA, Happo::SnapshotComparisonImage::Base::RED
Instance Method Summary collapse
Methods inherited from Base
#diff_alpha, #initialize, #pixel_diff_score, #render_added_row, #render_pixel, #render_row, #render_unchanged_row
Constructor Details
This class inherits a constructor from Happo::SnapshotComparisonImage::Base
Instance Method Details
#render_changed_row(y, row) ⇒ Object
8 9 10 |
# File 'lib/happo/snapshot_comparison_image/before.rb', line 8 def render_changed_row(y, row) render_deleted_row(y, row) end |
#render_deleted_row(y, row) ⇒ Object
14 15 16 17 18 |
# File 'lib/happo/snapshot_comparison_image/before.rb', line 14 def render_deleted_row(y, row) row.old_element.each_with_index do |pixel_before, x| render_pixel(x, y, pixel_before) end end |