Class: Quartz::Text
- Inherits:
-
Object
- Object
- Quartz::Text
- Defined in:
- lib/rubyquartz/text.rb
Constant Summary collapse
- @@AlignmentNameToNumber =
NSTextAlignment
{ :left => 0, :right => 1, :center => 2, :justified => 3, :natural => 4, }
Instance Method Summary collapse
-
#initialize(string, options = {}) ⇒ Text
constructor
This is really basic, not exposing the full power of the Cocoa text system.
- #size ⇒ Object
Constructor Details
#initialize(string, options = {}) ⇒ Text
This is really basic, not exposing the full power of the Cocoa text system
39 40 41 42 43 44 |
# File 'lib/rubyquartz/text.rb', line 39 def initialize(string, ={}) font = [:font] color = [:color] alignment = [:align] || :left _initialize(string, font, color, @@AlignmentNameToNumber[alignment]) end |