Sha256: 3f8c9765a3178b3abefbde88b288ed268c8eea50753f921fb538692dc9134f38

Contents?: true

Size: 608 Bytes

Versions: 2

Compression:

Stored size: 608 Bytes

Contents

# frozen_string_literal: false

# Core SVG data for stars.
#
# This class should never need to be called directly.
# @private
class USPSFlags::Core::Icons::Star
  def svg
    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]
    ]

    svg = "<path d=\"M 0 0\n"

    points.each do |x, y|
      svg << "l #{x} #{y}\n"
    end

    svg << "\" fill=\"#FFFFFF\" />\n"

    svg
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
usps_flags-0.4.1 lib/usps_flags/core/icons/star.rb
usps_flags-0.4.0 lib/usps_flags/core/icons/star.rb