module Neri::DXRubyImage

Public Instance Methods

load(path, x=nil, y=nil, width=nil, height=nil) click to toggle source
Calls superclass method
# File lib/neri/dxruby.rb, line 7
def load(path, x=nil, y=nil, width=nil, height=nil)
  if Neri.exist_in_datafile?(path)
    image = load_from_file_in_memory(Neri.file_read(path))
    image = image.slice(x, y, width, height) if x && y && width && height
    return image
  else
    return super
  end
end
load_tiles(path, xcount, ycount, share_switch=true) click to toggle source
Calls superclass method
# File lib/neri/dxruby.rb, line 17
def load_tiles(path, xcount, ycount, share_switch=true)
  if Neri.exist_in_datafile?(path) && !share_switch
    image = load_from_file_in_memory(Neri.file_read(path))
    return image.slice_tiles(xcount, ycount)
  else
    return super
  end
end