0

This I have extracted from this answer. Following is the SVG markup that has been posted there.

What I wanna know is, how do I make this square a circle? Basically once done, it should be a background with no fill, circle with the star shape taken out of it.

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
 width="400px" height="400px" viewBox="0 0 400 400" enable-background="new 0 0 400 400" xml:space="preserve">
     <path d="M4,5v391h391V5H4z M291.703,327.4L199.5,260.414l-92.204,66.991l35.219-108.403L50.312,152h113.97L199.5,43.608L234.719,152h113.97l-92.204,67.003L291.703,327.4z"/>
</svg>

Star Image

  • Using an SVG editor? Just editing the text? Using additional elements or not? Using clip paths or not? There are too many answers to this question as is – Zach Saucier Jun 16 '17 at 11:54
0
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"  

xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"  

width="400px" height="400px" viewBox="0 0 400 400" enable-background="new 0 0 400 400" xml:space="preserve">  

<path d="M199.5,5C91.528,5,4,92.528,4,200.5S91.528,396,199.5,396S395,308.472,395,200.5S307.472,5,199.5,5z M291.703,327.4

L199.5,260.414l-92.204,66.991l35.219-108.403L50.312,152h113.97L199.5,43.608L234.719,152h113.971l-92.205,67.003L291.703,327.4z"
/>
</svg>

To satisfy curiosity: I just opened your SVG in illustrator, modified the square to make it a circle and retrieved the path part of the resulting SVG code.

Now, if you need code to be dynamically generated, that would be another story and you should give more details about your workflow (i.e. use of javascript)

| improve this answer | |
  • You're welcome! Now if the downvoter may explain why he did so, it might help me to give more suitable answers or to fit requirements. – Vinny Jun 16 '17 at 7:27
  • Yeah! The entire Stack Exchange system needs some enforcing mechanism to explain the downvote, if and whenever there is a downvote! – Romeo Sierra Jun 16 '17 at 8:25
  • @Vinny - if it's worth aynthing to you, I've upvoted. – Billy Kerr Jun 16 '17 at 10:28
  • 2
    It was likely because you provide absolutely no explanation at all, which makes your answer not very helpful – Zach Saucier Jun 16 '17 at 11:52
  • 3
    At least, there should be some courtesy to mention that in a comment. Just a vote down, without in or out is not so helpful either... – Romeo Sierra Jun 16 '17 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.