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 1060 1060: def annotate_scaled(img, width, height, x, y, text, scale) 1061: scaled_width = (width * scale) >= 1 ? (width * scale) : 1 1062: scaled_height = (height * scale) >= 1 ? (height * scale) : 1 1063: 1064: self.annotate( img, 1065: scaled_width, scaled_height, 1066: x * scale, y * scale, 1067: text) 1068: end