Sha256: 5d551cc8a731b0a2ce5edb0b3ae71dc59301c812db796d9293f7b8749f5859ae

Contents?: true

Size: 218 Bytes

Versions: 38

Compression:

Stored size: 218 Bytes

Contents

class UIImage

  # @return [UIColor]
  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

38 entries across 38 versions & 1 rubygems

Version Path
sugarcube-1.5.9 lib/sugarcube-color/uiimage.rb
sugarcube-1.5.8 lib/sugarcube-color/uiimage.rb
sugarcube-1.5.7 lib/sugarcube-color/uiimage.rb
sugarcube-1.5.6 lib/sugarcube-color/uiimage.rb
sugarcube-1.5.5 lib/sugarcube-color/uiimage.rb
sugarcube-1.5.4 lib/sugarcube-color/uiimage.rb
sugarcube-1.5.3 lib/sugarcube-color/uiimage.rb
sugarcube-1.5.2 lib/sugarcube-color/uiimage.rb
sugarcube-1.5.1 lib/sugarcube-color/uiimage.rb
sugarcube-1.5.0 lib/sugarcube-color/uiimage.rb
sugarcube-1.4.6 lib/sugarcube-color/uiimage.rb
sugarcube-1.4.5 lib/sugarcube-color/uiimage.rb
sugarcube-1.4.4 lib/sugarcube-color/uiimage.rb
sugarcube-1.4.3 lib/sugarcube-color/uiimage.rb
sugarcube-1.4.2 lib/sugarcube-color/uiimage.rb
sugarcube-1.4.1 lib/sugarcube-color/uiimage.rb
sugarcube-1.4.0 lib/sugarcube-color/uiimage.rb
sugarcube-1.3.11 lib/sugarcube-color/uiimage.rb
sugarcube-1.3.10 lib/sugarcube-color/uiimage.rb
sugarcube-1.3.9 lib/sugarcube-color/uiimage.rb