    # File lib/compass/sass_extensions/sprites/layout_methods.rb, line 32
            def compute_image_positions!
              case layout
              when SMART
                calculate_smart_positions
              when DIAGONAL
                calculate_diagonal_dimensions
                calculate_diagonal_positions
              when HORIZONTAL
                @height = height_for_horizontal_layout
                calculate_horizontal_positions
                @width = width_for_horizontal_layout
              else
                @images.sort! do |a,b|
                  if (b.size <=> a.size) === 0
                    a.name <=> b.name
                  else
                    b.size <=> a.size
                  end
                end

                @width = width_for_vertical_layout
                calulate_vertical_postions
                @height = height_for_vertical_layout
                if @images.any?(&:repeat_x?)
                  calculate_repeat_extra_width!
                  tile_images_that_repeat
                 end
              end
            end