def bounds_for(canvas_size, position, size)
      return nil if (position.nil? || size.nil?)
      bounds = {}
      bounds[:x] = canvas_size.first * (position.first / 100.to_f)
      bounds[:y] = canvas_size.last  * (position.last  / 100.to_f)
      bounds[:width] = canvas_size.first * (size.first / 100.to_f)
      bounds[:height] = canvas_size.last * (size.last  / 100.to_f)
      bounds
    end
def bounds_for(canvas_size, position, size)
      return nil if (position.nil? || size.nil?)
      bounds = {}
      bounds[:x] = canvas_size.first * (position.first / 100.to_f)
      bounds[:y] = canvas_size.last  * (position.last  / 100.to_f)
      bounds[:width] = canvas_size.first * (size.first / 100.to_f)
      bounds[:height] = canvas_size.last * (size.last  / 100.to_f)
      bounds
    end
Converts percentage values into actual pixel values based on the known
 render size.

 Returns a hash consisting of :x, :y, :width, and :height elements.