Sha256: 0fae04bce268ac6b787c059b89c333219c3c2fe46a2714d0d16defd6623473dd
Contents?: true
Size: 576 Bytes
Versions: 5
Compression:
Stored size: 576 Bytes
Contents
require 'RMagick' # Return four equal quadrants, no parsing through the image # class Sqed::BoundaryFinder::CrossFinder < Sqed::BoundaryFinder def initialize(image: image) @image = image find_edges end def find_edges width = @image.columns / 2 height = @image.rows / 2 boundaries.coordinates[0] = [0, 0, width, height] boundaries.coordinates[1] = [width, 0, width, height] boundaries.coordinates[2] = [width, height, width, height] boundaries.coordinates[3] = [0, height, width, height] boundaries.complete = true end end
Version data entries
5 entries across 5 versions & 1 rubygems