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.
913 914 915 916 917 918 919 920 921 |
# File 'lib/gruff/base.rb', line 913 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 |