spatialillusions / milsymbol

Military Symbols in JavaScript
www.spatialillusions.com/milsymbol
MIT License
547 stars 134 forks source link

Trying to expand the elipse #186

Closed YahavTheKing123 closed 6 years ago

YahavTheKing123 commented 6 years ago

Hey,

I am trying to create 2525C SID S-G-UCFRMS icon, which consist of 3 other icons:

  1. icn["GR.IC.FIELD ARTILLERY"],
  2. icn["GR.M1.MULTIPLE ROCKET LAUNCHER"],
  3. icn["GR.IC.ARMOUR"]

Since the icon is not being genrated well (the point is too big and the double arrow is outside the elipse), I am trying to expand the elipse by giving it more space in upper and bottom so i will then use the "translate" to push the arrow back inside the elipse. but unfortunatly I am not succedding with it..

This is the SVG path who create the elipse: path d="M125,80 C150,80 150,120 125,120 L75,120 C50,120 50,80 75,80 Z"

Any idea which value should I give here?

spatialillusions commented 6 years ago

If you look in the dev folder, there is a SVG called octagon.svg, this can be opened in incscape and then you can draw paths and extract the path from the generated xml. I would guess that you would like to have something like:

m 125,75 c 25,0 25,50 0,50 H 75 C 50,125 50,75 75,75 Z

Keep in mind that this change of icn["GR.IC.ARMOUR"] will change ALL armour icons.

Another solution would be to first make your own override symbols, them sort of icn["YTK123.ARMOUR"= ... and then override the symbol code as described in the documentation. https://github.com/spatialillusions/milsymbol/tree/master/docs#msaddlabeloverrideslabelfunction-type

YahavTheKing123 commented 6 years ago

Great :) Thank you for your support!