Class: Magick::Draw

Inherits:
Object
  • Object
show all
Defined in:
lib/gamercard.rb

Instance Method Summary collapse

Instance Method Details

#annotate_scaled(img, width, height, x, y, text, scale) ⇒ Object

Additional method to scale annotation text since Draw.scale doesn’t.



118
119
120
121
122
123
# File 'lib/gamercard.rb', line 118

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