Class | Magick::Draw |
In: |
lib/gruff/base.rb
|
Parent: | Object |
Additional method to scale annotation text since Draw.scale doesn‘t.
# File lib/gruff/base.rb, line 1089 1089: def annotate_scaled(img, width, height, x, y, text, scale) 1090: scaled_width = (width * scale) >= 1 ? (width * scale) : 1 1091: scaled_height = (height * scale) >= 1 ? (height * scale) : 1 1092: 1093: self.annotate( img, 1094: scaled_width, scaled_height, 1095: x * scale, y * scale, 1096: text) 1097: end