Sha256: 47ceb4ef071635d12cec7d40f6f9823b59981a546b3a70ad8fc523c4317234cf

Contents?: true

Size: 715 Bytes

Versions: 14

Compression:

Stored size: 715 Bytes

Contents

# frozen_string_literal: false

# Core SVG data for stars.
#
# This class should never need to be called directly.
# @private
class USPSFlags
  class Core
    module Icons
      class Star
        def svg
          svg = "<path d=\"M 0 0\n"
          points.each { |x, y| svg << "l #{x} #{y}\n" }
          svg << "\" fill=\"#FFFFFF\" />\n"

          svg
        end

      private

        def points
          [
            [117.555,   81.805], [-41.47,  -137.085], [114.125, -86.525],
            [-143.185,  -2.915], [-47.025, -135.28], [-47.025, 135.28],
            [-143.185,  2.915], [114.125,  86.525], [-41.47, 137.085],
            [117.555, -81.805]
          ]
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
usps_flags-0.6.4 lib/usps_flags/core/icons/star.rb
usps_flags-0.6.3 lib/usps_flags/core/icons/star.rb
usps_flags-0.6.2 lib/usps_flags/core/icons/star.rb
usps_flags-0.6.1 lib/usps_flags/core/icons/star.rb
usps_flags-0.6.0 lib/usps_flags/core/icons/star.rb
usps_flags-0.5.9 lib/usps_flags/core/icons/star.rb
usps_flags-0.5.8 lib/usps_flags/core/icons/star.rb
usps_flags-0.5.7 lib/usps_flags/core/icons/star.rb
usps_flags-0.5.6 lib/usps_flags/core/icons/star.rb
usps_flags-0.5.5 lib/usps_flags/core/icons/star.rb
usps_flags-0.5.4 lib/usps_flags/core/icons/star.rb
usps_flags-0.5.3 lib/usps_flags/core/icons/star.rb
usps_flags-0.5.2 lib/usps_flags/core/icons/star.rb
usps_flags-0.5.1 lib/usps_flags/core/icons/star.rb