Sha256: fb091f478deddfd4db0ea3bdcd4ea1a4f34ab7c324e502cf6df045d8476a2d37
Contents?: true
Size: 625 Bytes
Versions: 1
Compression:
Stored size: 625 Bytes
Contents
require_relative 'r_swt' class RColor attr_reader :display, :red, :green, :blue, :alpha include_package 'org.eclipse.swt.graphics' class << self include_package 'org.eclipse.swt' def for(display, standard_color) display.getSystemColor(RSwt[standard_color]) end end def initialize(display, red, green, blue, alpha = nil) @display = display @red = red @green = green @blue = blue @alpha = alpha end def color @color ||= Color.new(@display, *[@red, @green, @blue, @alpha].compact) end def display=(a_display) @display = a_display @color = nil end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
glimmer-0.3.5 | lib/command_handlers/models/r_color.rb |