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