Class: Clogs::Paragraph::TextStyle
- Inherits:
-
Struct
- Object
- Struct
- Clogs::Paragraph::TextStyle
- Defined in:
- lib/clogs/paragraph.rb
Overview
An immutable text style. Runs with equal styles can be drawn together.
Instance Attribute Summary collapse
-
#bg ⇒ Object
Returns the value of attribute bg.
-
#bold ⇒ Object
Returns the value of attribute bold.
-
#color ⇒ Object
Returns the value of attribute color.
-
#family ⇒ Object
Returns the value of attribute family.
-
#italic ⇒ Object
Returns the value of attribute italic.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#size ⇒ Object
Returns the value of attribute size.
-
#underline ⇒ Object
Returns the value of attribute underline.
Instance Method Summary collapse
Instance Attribute Details
#bg ⇒ Object
Returns the value of attribute bg
67 68 69 |
# File 'lib/clogs/paragraph.rb', line 67 def bg @bg end |
#bold ⇒ Object
Returns the value of attribute bold
67 68 69 |
# File 'lib/clogs/paragraph.rb', line 67 def bold @bold end |
#color ⇒ Object
Returns the value of attribute color
67 68 69 |
# File 'lib/clogs/paragraph.rb', line 67 def color @color end |
#family ⇒ Object
Returns the value of attribute family
67 68 69 |
# File 'lib/clogs/paragraph.rb', line 67 def family @family end |
#italic ⇒ Object
Returns the value of attribute italic
67 68 69 |
# File 'lib/clogs/paragraph.rb', line 67 def italic @italic end |
#owner ⇒ Object
Returns the value of attribute owner
67 68 69 |
# File 'lib/clogs/paragraph.rb', line 67 def owner @owner end |
#size ⇒ Object
Returns the value of attribute size
67 68 69 |
# File 'lib/clogs/paragraph.rb', line 67 def size @size end |
#underline ⇒ Object
Returns the value of attribute underline
67 68 69 |
# File 'lib/clogs/paragraph.rb', line 67 def underline @underline end |
Instance Method Details
#cache_key ⇒ Object
68 69 70 |
# File 'lib/clogs/paragraph.rb', line 68 def cache_key @cache_key ||= [family, size, bold, italic].freeze end |
#same_run_as?(other) ⇒ Boolean
76 77 78 79 |
# File 'lib/clogs/paragraph.rb', line 76 def same_run_as?(other) family == other.family && size == other.size && bold == other.bold && italic == other.italic && underline == other.underline && color == other.color end |