Class: Skia::FontMetrics
- Inherits:
-
Object
- Object
- Skia::FontMetrics
- Defined in:
- lib/skia/font.rb
Instance Attribute Summary collapse
-
#ascent ⇒ Object
readonly
Returns the value of attribute ascent.
-
#avg_char_width ⇒ Object
readonly
Returns the value of attribute avg_char_width.
-
#bottom ⇒ Object
readonly
Returns the value of attribute bottom.
-
#cap_height ⇒ Object
readonly
Returns the value of attribute cap_height.
-
#descent ⇒ Object
readonly
Returns the value of attribute descent.
-
#leading ⇒ Object
readonly
Returns the value of attribute leading.
-
#max_char_width ⇒ Object
readonly
Returns the value of attribute max_char_width.
-
#strikeout_position ⇒ Object
readonly
Returns the value of attribute strikeout_position.
-
#strikeout_thickness ⇒ Object
readonly
Returns the value of attribute strikeout_thickness.
-
#top ⇒ Object
readonly
Returns the value of attribute top.
-
#underline_position ⇒ Object
readonly
Returns the value of attribute underline_position.
-
#underline_thickness ⇒ Object
readonly
Returns the value of attribute underline_thickness.
-
#x_height ⇒ Object
readonly
Returns the value of attribute x_height.
-
#x_max ⇒ Object
readonly
Returns the value of attribute x_max.
-
#x_min ⇒ Object
readonly
Returns the value of attribute x_min.
Instance Method Summary collapse
-
#initialize(struct) ⇒ FontMetrics
constructor
A new instance of FontMetrics.
Constructor Details
#initialize(struct) ⇒ FontMetrics
Returns a new instance of FontMetrics.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/skia/font.rb', line 100 def initialize(struct) @top = struct[:top] @ascent = struct[:ascent] @descent = struct[:descent] @bottom = struct[:bottom] @leading = struct[:leading] @avg_char_width = struct[:avgCharWidth] @max_char_width = struct[:maxCharWidth] @x_min = struct[:xMin] @x_max = struct[:xMax] @x_height = struct[:xHeight] @cap_height = struct[:capHeight] @underline_thickness = struct[:underlineThickness] @underline_position = struct[:underlinePosition] @strikeout_thickness = struct[:strikeoutThickness] @strikeout_position = struct[:strikeoutPosition] end |
Instance Attribute Details
#ascent ⇒ Object (readonly)
Returns the value of attribute ascent.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def ascent @ascent end |
#avg_char_width ⇒ Object (readonly)
Returns the value of attribute avg_char_width.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def avg_char_width @avg_char_width end |
#bottom ⇒ Object (readonly)
Returns the value of attribute bottom.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def bottom @bottom end |
#cap_height ⇒ Object (readonly)
Returns the value of attribute cap_height.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def cap_height @cap_height end |
#descent ⇒ Object (readonly)
Returns the value of attribute descent.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def descent @descent end |
#leading ⇒ Object (readonly)
Returns the value of attribute leading.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def leading @leading end |
#max_char_width ⇒ Object (readonly)
Returns the value of attribute max_char_width.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def max_char_width @max_char_width end |
#strikeout_position ⇒ Object (readonly)
Returns the value of attribute strikeout_position.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def strikeout_position @strikeout_position end |
#strikeout_thickness ⇒ Object (readonly)
Returns the value of attribute strikeout_thickness.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def strikeout_thickness @strikeout_thickness end |
#top ⇒ Object (readonly)
Returns the value of attribute top.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def top @top end |
#underline_position ⇒ Object (readonly)
Returns the value of attribute underline_position.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def underline_position @underline_position end |
#underline_thickness ⇒ Object (readonly)
Returns the value of attribute underline_thickness.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def underline_thickness @underline_thickness end |
#x_height ⇒ Object (readonly)
Returns the value of attribute x_height.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def x_height @x_height end |
#x_max ⇒ Object (readonly)
Returns the value of attribute x_max.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def x_max @x_max end |
#x_min ⇒ Object (readonly)
Returns the value of attribute x_min.
97 98 99 |
# File 'lib/skia/font.rb', line 97 def x_min @x_min end |