Class: Magick::Draw
- Inherits:
-
Object
- Object
- Magick::Draw
- Defined in:
- lib/gruff/base.rb
Instance Method Summary collapse
-
#annotate_scaled(img, width, height, x, y, text, scale) ⇒ Object
Additional method to scale annotation text since Draw.scale doesn’t.
Instance Method Details
#annotate_scaled(img, width, height, x, y, text, scale) ⇒ Object
Additional method to scale annotation text since Draw.scale doesn’t.
1111 1112 1113 1114 1115 1116 1117 1118 1119 |
# File 'lib/gruff/base.rb', line 1111 def annotate_scaled(img, width, height, x, y, text, scale) scaled_width = (width * scale) >= 1 ? (width * scale) : 1 scaled_height = (height * scale) >= 1 ? (height * scale) : 1 self.annotate( img, scaled_width, scaled_height, x * scale, y * scale, text) end |