class Frameit::MacEditor

Responsible for framing Mac Screenshots

Public Instance Methods

generate_background() click to toggle source
# File lib/frameit/mac_editor.rb, line 28
def generate_background
  MiniMagick::Image.open(fetch_config['background']) # no resizing on the Mac
end
load_frame() click to toggle source
# File lib/frameit/mac_editor.rb, line 20
def load_frame
  nil # Macs don't need frames - backgrounds only
end
prepare_image() click to toggle source
Calls superclass method Frameit::Editor#prepare_image
# File lib/frameit/mac_editor.rb, line 4
def prepare_image
  image = super
  image.resize("#{offset['width']}x") if offset['width']
end
put_device_into_background(background) click to toggle source
# File lib/frameit/mac_editor.rb, line 9
def put_device_into_background(background)
  self.top_space_above_device = offset['titleHeight'] # needed for centering the title

  @image = background.composite(image, "png") do |c|
    c.compose "Over"
    c.geometry offset['offset']
  end

  return image
end
should_add_title?() click to toggle source
# File lib/frameit/mac_editor.rb, line 24
def should_add_title?
  true # Mac screenshots always need a background
end