# Core SVG data for the US Ensign.
#
# This class should never need to be called directly.
# @private
class USPSFlags::Core::US
def svg
base_hoist = 2000.to_f
base_fly = base_hoist*1.91
canton_hoist = base_hoist*7/13
canton_fly = canton_hoist*Math.sqrt(2)
star_offset = 20 # Half of scaled star height
svg = ""
svg << <<~SVG
SVG
[1,3,5,7,9].each do |r|
[1,3,5,7,9,11].each do |c|
svg << <<~SVG
#{USPSFlags::Core::Star.new.svg}
SVG
end
end
[2,4,6,8].each do |r|
[2,4,6,8,10].each do |c|
svg << <<~SVG
#{USPSFlags::Core::Star.new.svg}
SVG
end
end
# star_diameter = base_hoist*4/5/13
# svg << <<~SVG
#
# SVG
svg
end
end