Sha256: 505de1310a91ec6f9b1d8effb84be714e8fb930acd2845fbf7828f33f9fe42a6

Contents?: true

Size: 226 Bytes

Versions: 4

Compression:

Stored size: 226 Bytes

Contents


class UIImage
  def uiimage ; self ; end


  def uicolor(alpha=nil)
    color = UIColor.colorWithPatternImage(self)
    if not alpha.nil?
      color = color.colorWithAlphaComponent(alpha.to_f)
    end

    color
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sugarcube-0.2.3 lib/sugarcube/uiimage.rb
sugarcube-0.2.2 lib/sugarcube/uiimage.rb
sugarcube-0.2.1 lib/sugarcube/uiimage.rb
sugarcube-0.2.0 lib/sugarcube/uiimage.rb