I am trying to create a polygon (triangle) in snap.svg. I read the docs and I'm still not sure what to do. I see the polygon object in the documents there, but there is no clear way to use it. Where would I put glasses for my training ground?
Will it be something like this?
paper.polygon("M10, 20L30, 40");
You can use an array or just coords together, for example
s.polygon(10,10,10,30,100,100).attr({ fill: "red", stroke: "blue" });
or
s.polygon([110,10,110,230,80,30]).attr({ fill: "yellow", stroke: "green" });
Source: https://habr.com/ru/post/1541161/More articles:Перемещение матриц, переносящее с Java на C, несовместимые типы - javaUsing app.set vs app.value in Express - node.jsBinary output Neural network in Python Theano - pythonmysqldump: received error: 1045 Access denied - mysqlHow does this workaround algorithm work? - javaConfiguring cover.py with a bulb - pythonCan I use the Angular custom service before downloading? - angularjsCorrect word splitting with apostrophes in Solr - luceneКак передать gulp.watch() в канал? - javascriptDrupal 7: добавить элемент в панель инструментов/меню администратора программно - drupalAll Articles