def to_s
      str = ''
      if @width > 0
        fmt = @width.truncate == @width ? '%d' : '%.2f'
        str << format(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 << format(fmt, @height)
        str << '%' if @flag == PercentGeometry
      end
      str << format('%+d%+d', @x, @y) if @x != 0 || @y != 0
      str << FLAGS[@flag.to_i] if @flag != PercentGeometry
      str
    end
def to_s
      str = ''
      if @width > 0
        fmt = @width.truncate == @width ? '%d' : '%.2f'
        str << format(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 << format(fmt, @height)
        str << '%' if @flag == PercentGeometry
      end
      str << format('%+d%+d', @x, @y) if @x != 0 || @y != 0
      str << FLAGS[@flag.to_i] if @flag != PercentGeometry
      str
    end
Convert object to a geometry string