Class: UIColor
Instance Method Summary collapse
Instance Method Details
#with(options) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/project/ext/ui_color.rb', line 3 def with() type = CGSize.type[/(f|d)/] r, g, b, a = Pointer.new(type), Pointer.new(type), Pointer.new(type), Pointer.new(type) self.getRed(r, green: g, blue: b, alpha: a) r = [:r] || [:red] || r.value g = [:g] || [:green] || g.value b = [:b] || [:blue] || b.value a = [:a] || [:alpha] || a.value UIColor.colorWithRed(r, green: g, blue: b, alpha: a) end |