module Compass::Magick::Util
  def self.number_value(number, length, default = nil)
    return default if number.nil? || number.is_a?(Sass::Script::Bool)
    return length * (number.value.to_f / 100) if number.unit_str === '%'
    number.value
  end
end

module Compass::Magick::Util
  def self.number_value(number, length, default = nil)
    return default if number.nil? || number.is_a?(Sass::Script::Bool)
    return length * (number.value.to_f / 100) if number.unit_str === '%'
    return length + number.value if number.value < 0
    number.value
  end
end

Add support for negative positions so '-10' translates to `width - 10`.
Add support for negative positions so '-10' translates to `width - 10`.

You can now clear an image and leave a 1px edge by using:

    magick-erase(red, 1, 1, -1, -1)
