Code Monkey home page Code Monkey logo

Comments (14)

devame avatar devame commented on September 24, 2024 3

Excellent post! Thank you.

from aleksandrhovhannisyan.com.

ResetPress avatar ResetPress commented on September 24, 2024 2

incredible tutorial! This is getting starred

from aleksandrhovhannisyan.com.

Gazook89 avatar Gazook89 commented on September 24, 2024 1

Hey, I saw a comment by you on a reddit post that pointed to this article, and I almost did what I always do: bookmark it for "later". However, I guess the timing was just right between other projects and I actually started reading.

I'm glad I did! This was a very thorough and clear guide-- I liked the examples and the linked 'additional resources' were of great value too. I never comment on articles but since I suspect I'll keep coming back to this one, I figured I'd especially say thanks!

from aleksandrhovhannisyan.com.

AsafAgranat avatar AsafAgranat commented on September 24, 2024 1

Wow. Fantastic read. Not only does it clear any mysteries about SVG, it was also fun to go through! Well done pal.

from aleksandrhovhannisyan.com.

muratcorlu avatar muratcorlu commented on September 24, 2024 1

Great tutorial. Today I’m reading your blog posts like reading a book. I’m inspired a lot from your articles. Thank you for all!

from aleksandrhovhannisyan.com.

raiden6 avatar raiden6 commented on September 24, 2024 1

@AleksandrHovhannisyan Thanks for the update! I was confused in thinking that H and V needed both x and y values. But I get it now. You only need one value (either an x or a y position) since you’re only moving in one direction.

from aleksandrhovhannisyan.com.

boumboum avatar boumboum commented on September 24, 2024

Excellent tutorial. Helps a lot.
But there is a tiny typo in the diagonal LineTo part.
The explanation says: “Move to (2, 2) and draw a line 20 units over to the right and 20 units down.”
while the provided code draws a 22 unit line down to the bottom-right corner:
d="
M 2 2
l 22 22"

from aleksandrhovhannisyan.com.

AleksandrHovhannisyan avatar AleksandrHovhannisyan commented on September 24, 2024

@boumboum Nice catch! The rendered version uses 20 (correct), but the code snippet uses 22 (incorrect). I've updated the code snippet to use the correct offset. Thanks for reading!

from aleksandrhovhannisyan.com.

AleksandrHovhannisyan avatar AleksandrHovhannisyan commented on September 24, 2024

Really glad to hear that, thank you!

from aleksandrhovhannisyan.com.

israelss avatar israelss commented on September 24, 2024

Thank you for this excellent article! It absolutely cleared the fog around svg syntax that was in my mind!
If you allow me, I want to translate it to brazilian portuguese, and post it at my blog, with a ping back here. Do I have your permission to do so?

from aleksandrhovhannisyan.com.

Yash-Sharma2002 avatar Yash-Sharma2002 commented on September 24, 2024

Is is very helpful thanx for sharing that post.

from aleksandrhovhannisyan.com.

raiden6 avatar raiden6 commented on September 24, 2024

Great write up! For the external link icon, could you explain the H 6, V 10, and H 12 commands? I thought those are absolute and require both x and y positions. How does H 6 draw the long horizontal line at the bottom after the first arc?

from aleksandrhovhannisyan.com.

AleksandrHovhannisyan avatar AleksandrHovhannisyan commented on September 24, 2024

@raiden6 Sure! So H 6 basically says: "Draw a horizontal line to the x coordinate of 6." This makes the math easier since you don't have to figure out how many units to move to the left and do a relative command of h <displacement>. In this example, it would be identical to doing h -10 because 18 - 10 - 2 = 6 (the two is from the arc). This completes the bottom horizontal piece of the rectangle portion. Here's a fiddle showing both approaches: https://jsfiddle.net/AleksandrHovhannisyan/hrp3xz1q/4/. I've also updated the article to clarify absolute vs. relative commands better.

from aleksandrhovhannisyan.com.

AleksandrHovhannisyan avatar AleksandrHovhannisyan commented on September 24, 2024

@raiden6 Yup, exactly! H/V are basically shortcuts for L (LineTo) with the other coordinate kept the same. So H is the same as L newX currentY and V is the same as L currentX newY. Similarly, h is the same as l dx 0 and v is the same as l 0 dy.

from aleksandrhovhannisyan.com.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.