SVG-oriented Services - part #2
I've introduced you to the possibility of creating stunning graphics using services. Instead, I should have talked about APIs, or better still, classes, that can help you build complex graphs. Of course, some of these classes are also exposed through services, true. I've shown you two: a service to create stars with n-branches and a service to create "flowers" with n-petals.
This time, I'm adding 2 services: the creation of signs and the creation of regular polygons with n vertices.
Signs
In concrete terms, we're talking about this kind of sign: a rectangle with rounded edges, variable text with a customizable font, variable size, optional rotation angle, colors ...
You can test this service with our standard test procedure. You'll also see that this procedure allows you to download the freshly generated SVG.
https://trql.fm/test.marquee.service.php?text=Report%20available!&fill=orange&rotate=-45&h=50&w=200&font-fill=black&stroke-width=5&stroke=red&font-weight=normal&font-size=20px&font-family=Times%20New%20Roman
Polygons
The creation of regular polygons is a matter of math, or trigonometry to be precise. I'll spare you: the basic classes do all the calculations for you. Calling the service can produce a result similar to:
Test it yourself with our standard test procedure.
领英推荐
https://www.trql.fm/vaesoli!/?svg-polygon&stroke-width=0.2&radius=200&n=20&web=&id=mySVG
Test it yourself with our test procedure.
https://www.trql.fm/vaesoli!/?svg-polygon&fill=orange&stroke-width=0.2&radius=200&n=10&id=mySVG
In a next article, I'll show you how you can combined SVGs together, here below, a polygon and an arrow:
Conclusions
I am extending the SVG-oriented services bit by bit. We now have 4 SVG-oriented services.
Should you want to be included in the beta-testers or even be part of the development of these solutions, drop me a line or two here on LinkedIn I will be more than happy to answer all the requests.
Such work is documented (see the catalog of services) and is used, in real projects: You're no guinea pig. I wish you all the best and ... above all ... no fuss!