Class: Ucode::Glyphs::PathBbox::Result
- Inherits:
-
Struct
- Object
- Struct
- Ucode::Glyphs::PathBbox::Result
- Defined in:
- lib/ucode/glyphs/path_bbox.rb
Instance Attribute Summary collapse
-
#max_x ⇒ Object
Returns the value of attribute max_x.
-
#max_y ⇒ Object
Returns the value of attribute max_y.
-
#min_x ⇒ Object
Returns the value of attribute min_x.
-
#min_y ⇒ Object
Returns the value of attribute min_y.
Instance Method Summary collapse
Instance Attribute Details
#max_x ⇒ Object
Returns the value of attribute max_x
21 22 23 |
# File 'lib/ucode/glyphs/path_bbox.rb', line 21 def max_x @max_x end |
#max_y ⇒ Object
Returns the value of attribute max_y
21 22 23 |
# File 'lib/ucode/glyphs/path_bbox.rb', line 21 def max_y @max_y end |
#min_x ⇒ Object
Returns the value of attribute min_x
21 22 23 |
# File 'lib/ucode/glyphs/path_bbox.rb', line 21 def min_x @min_x end |
#min_y ⇒ Object
Returns the value of attribute min_y
21 22 23 |
# File 'lib/ucode/glyphs/path_bbox.rb', line 21 def min_y @min_y end |
Instance Method Details
#empty? ⇒ Boolean
34 35 36 |
# File 'lib/ucode/glyphs/path_bbox.rb', line 34 def empty? min_x.nil? || min_y.nil? || max_x.nil? || max_y.nil? end |
#height ⇒ Object
28 29 30 31 32 |
# File 'lib/ucode/glyphs/path_bbox.rb', line 28 def height return nil if empty? max_y - min_y end |
#width ⇒ Object
22 23 24 25 26 |
# File 'lib/ucode/glyphs/path_bbox.rb', line 22 def width return nil if empty? max_x - min_x end |