class Magick::Draw
Public Instance Methods
annotate_scaled(img, width, height, x, y, text, scale)
click to toggle source
annotate_scaled
¶ ↑
Additional method to scale annotation text since Draw.scale doesn’t.
# File lib/image_paradise/graphs/base.rb, line 1372 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.gsub('%', '%%')) end