Sha256: 2064695d4d2d27847bed7a320265f755656b15a76537078d6f9bb0a922d45fa7

Contents?: true

Size: 232 Bytes

Versions: 54

Compression:

Stored size: 232 Bytes

Contents

class NSNumber

  ##|
  ##|  MISC
  ##|

  # Uses the screen scale to determine how many pixels (converts "pixels" to
  # "points")
  def pixels
    self.to_f / NSScreen.mainScreen.backingScaleFactor
  end
  alias pixel pixels

end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
sugarcube-4.0.0 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.5.0 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.4.2 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.4.1 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.4.0 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.3.7 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.3.6 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.3.5 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.3.4 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.3.3 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.3.2 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.3.1 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.3.0 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.2.0 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.1.1 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.1.0 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.0.8 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.0.7 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.0.6 lib/osx/sugarcube-numbers/nsnumber.rb
sugarcube-3.0.5 lib/osx/sugarcube-numbers/nsnumber.rb