1 Summary of MVG Primitives and Syntax
2 ====================================
4 MVG ignores all white-space between commands. This allows
5 multiple MVG commands per line. It is common convention to
6 terminate each MVG command with a new line to make MVG easier
7 to edit and read. This syntax description uses indentation in
8 MVG sequences to aid with understanding. Indentation is
9 supported but is not required.
11 Metafile wrapper syntax (to support stand-alone MVG files)
12 ----------------------------------------------------------
15 viewbox 0 0 width height
16 [ any other MVG commands ]
20 Pattern syntax (saving and restoring context)
21 ---------------------------------------------
23 push pattern id x,y width,height
29 an example is (%s is a identifier string)
32 push pattern %s 10,10 20,20
46 push pattern id x,y width,height
50 Note you can use the pattern for either the fill or stroke like
61 The clip path defines a clipping area, where only the contained
62 area will be drawn upon. Areas outside of the clipping area are
74 Individual Drawing Primitives
75 =============================
77 affine sx,rx,ry,sy,tx,ty
79 bezier x0,y0 ... xn,yn
80 circle originX,originY perimX,perimY
81 clip-path url(#%s) (%s is the name of the clip path)
82 clip-rule (evenodd|nonzero)
83 clip-units (userSpace|userSpaceOnUse|objectBoundingBox)
84 color x,y (point|replace|floodfill|filltoborder|reset)
85 decorate (none|underline|overline|line-through)
86 ellipse centerX,centerY radiusX,radiusY arcStart,arcEnd
88 fill-opacity opacity[%]
89 fill-rule (evenodd|nonzero)
91 font-family familyname (e.g. "helvetica")
93 font-stretch (all|normal|ultra-condensed|extra-condensed|condensed|
94 semi-condensed|semi-expanded|expanded|extra-expanded|
96 font-style (all|normal|italic|oblique)
97 font-weight (all|normal|bold|100|200|300|400|500|600|700|800|900)
98 gradient-units (userSpace|userSpaceOnUse|objectBoundingBox)
99 gravity (NorthWest|North|NorthEast|West|Center|East|SouthWest|
101 image (Add|Atop|Bumpmap|Clear|CopyBlue|CopyGreen|CopyOpacity|CopyRed|
102 Copy|Difference|In|Minus|Multiply|Out|Over|Plus|Subtract|Xor)
103 dest_x,dest_y dest_width,dest_height 'filename'
104 line startX,startY endX,endY
105 matte x,y (point|replace|floodfill|filltoborder|reset)
108 path 'SVG-compatible path arguments'
110 polygon x1,y1, x2,y2, x3,y3, ..., xN,yN
111 polyline x1,y1, x2,y2, x3,y3, ..., xN,yN
117 push clip-path %s (%s is the name of the clip path)
119 push gradient id linear x1,y1 x2,y2
120 push gradient id radial cx,cy fx,fy r
122 push pattern id x,y width,height
123 rectangle upperLeftX,upperLeftY lowerRightX,lowerRightY
125 roundrectangle upperLeftX,upperLeftY lowerRightX,lowerRightY cornerWidth,cornerHeight
129 stop-color colorspec offset
131 stroke-antialias truth-value (0 or 1)
132 stroke-dasharray (none|comma-delimited-numeric-list)
133 stroke-dashoffset dashoffset
134 stroke-linecap (butt|round|square)
135 stroke-linejoin (butt|miter|round|square)
136 stroke-miterlimit limit
137 stroke-opacity opacity[%]
138 stroke-width linewidth
141 text-undercolor colorspec
143 viewbox x1 y1 x1 y2 (e.g. "viewbox 0 0 640 480")