Sha256: aa4a026f41fdee09053d13856b87e20ff904670e506ad08b8dbde0b20b0a457d
Contents?: true
Size: 574 Bytes
Versions: 21
Compression:
Stored size: 574 Bytes
Contents
require 'rmagick' # Return four equal quadrants, no parsing through the image # class Sqed::BoundaryFinder::CrossFinder < Sqed::BoundaryFinder def initialize(**opts) @image = opts[: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
21 entries across 21 versions & 1 rubygems