Sha256: 102d07b2e3d1944db30f4e3b2c8206b49ec2386d0f68167c45630f670c7ff597

Contents?: true

Size: 452 Bytes

Versions: 2

Compression:

Stored size: 452 Bytes

Contents

module Ray
  class PixelBus
    # @group Copying data

    # Duplicates an image through this bus
    #
    # @param [Ray::Image] image Image to be copied
    # @param [Integer] offset Offset to write the pixels to
    #
    # @return [Ray::Image] Copied image
    def copy(image, offset = 0)
      copy = Ray::Image.new image.size

      pull image, :offset => offset
      push copy,  :offset => offset

      copy
    end

    # @endgroup
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ray-0.2.1 lib/ray/pixel_bus.rb
ray-0.2.0 lib/ray/pixel_bus.rb