My ultimate goal is to export designs created in mobile apps as vector graphics. Say I have a list of points of corners of shapes and the respective color that goes inside each shape and this design is being displayed on a mobile app (iOS and Android because cocos2d-x is being used). Is it possible to convert this information into a vector file (SVG file which is essentially an XML file)?
相关问题
- Ionic Spinner not showing up
- Convert svg to geojson fails with ogr2ogr
- Set *both* elements and initial capacity of std::v
- How to get coordinates of an svg?
- Changing color of SVG which was embedded using <
相关文章
- How do I get characters common to two vectors in C
- Make marker-end same color as path?
- How to display unicode in SVG?
- is there a “rails” way to redirect if mobile brows
- Converting svg to png with inkscape command line f
- How can I unpack (destructure) elements from a vec
- How to create an SVG Matrix without an SVG element
- rect collision detection d3js
SVG contains a
path
element that stores the lines that make up a shape's path. Thed
attribute stores a path string, and thestyle
attributes stores the path's styling, such as stroke and fill. To export a shape to SVG there are several things you should care about:The size of the SVG in pixels (the
width
andheight
attributes)Example:
<svg width='640px' height='640px'
The size of the shape in pixels (the
viewBox
attributes)Example:
viewBox='0 0 100 100'
The color used to stroke the shape
Example:
style='stroke:red;'
orstyle='stroke:none;'
The color used to fill each shape
Example:
style='fill:blue;'
orstyle='fill:none;'
The shape of the path
Example:
d='M10 10L20 20 L30 10Z'
Example SVG file: