class Magick::Geometry
def to_s
def to_s str = +'' if @width > 0 fmt = @width.truncate == @width ? '%d' : '%.2f' str << sprintf(fmt, @width) str << '%' if @flag == PercentGeometry end str << 'x' if (@width > 0 && @flag != PercentGeometry) || (@height > 0) if @height > 0 fmt = @height.truncate == @height ? '%d' : '%.2f' str << sprintf(fmt, @height) str << '%' if @flag == PercentGeometry end str << sprintf('%+d%+d', @x, @y) if @x != 0 || @y != 0 str << FLAGS[@flag.to_i] if @flag != PercentGeometry str end