class Glimmer::SWT::ImageProxy

emulating org.eclipse.swt.graphics.Image

Attributes

file_path[R]
height[R]
width[R]

Public Class Methods

create(*args, &content) click to toggle source
# File lib/glimmer/swt/image_proxy.rb, line 6
def create(*args, &content)
  if args.size == 1 && args.first.is_a?(ImageProxy)
    args.first
  else
    new(*args, &content)
  end
end
new(*args) click to toggle source
# File lib/glimmer/swt/image_proxy.rb, line 17
def initialize(*args)
  options = args.last.is_a?(Hash) ? args.last : {}
  # TODO support a parent as a first argument before the file path
  @file_path = args.first
  @width = options[:width]
  @height = options[:height]
end