[ImageMagick]
[sponsor]

Work in progress! More to come in the near future

Introduction to Vector Graphics

MVG ignores all white-space between commands. This allows multiple MVG commands per line. It is common convention to terminate each MVG command with a new line to make MVG easier to edit and read. This syntax description uses indentation in MVG sequences to aid with understanding. Indentation is supported but is not required.

Metafile wrapper syntax (to support stand-alone MVG files) ----------------------------------------------------------
  push graphic-context
   viewbox 0 0 width height
    [ any other MVG commands ]
  pop graphic-context
Pattern syntax (saving and restoring context) ---------------------------------------------
  push pattern id x,y width,height
   push graphic-context
    [ drawing commands ]
   pop graphic-context
  pop pattern
an example is (%s is a identifier string)
  push defs
   push pattern %s 10,10 20,20
    push graphic-context
     fill red
     rectangle 5,5 15,15
    pop graphic-context
    push graphic-context
     fill green
     rectangle 10,10 20,20
    pop graphic-context
   pop pattern
  pop defs
For image tiling use
  push pattern id x,y width,height
   image Copy ...
  pop pattern
Note you can use the pattern for either the fill or stroke like
  stroke url(#%s)
or
  fill url(#%s)
Clip-path syntax ---------------- The clip path defines a clipping area, where only the contained area will be drawn upon. Areas outside of the clipping area are masked.
  push defs
   push clip-path %s
    push graphic-context
     rectangle 10,10 20,20
    pop graphic-context
   pop clip-path
  pop defs
  clip-path url(#%s)

Drawing Primitives

affine sx,rx,ry,sy,tx,ty

arc x0,y0   x1,y1   a0,a1

bezier x0,y0 ... xn,yn

circle originx,originy   perimeterx,perimetery

clip-path url(name)

clip-rule rule

Choose from these rule types:

  evenodd
  nonzero

clip-units units

Choose from these unit types:

  userSpace
  userSpaceOnUse
  objectBoundingBox

color x,y method

Choose from these method types:

  point
  replace
  floodfill
  filltoborder
  reset

decorate type

Choose from these types of decorations:

  none
  line-through
  overline
  underline

ellipse centerx,centery   radiusx,radiusy   arcstart,arcstop

fill color

Choose from any of these colors.

fill-opacity opacity

The opacity ranges from 0.0 (fully opaque) to 1.0 (fully transparent) or as a percentage (e.g. 50%).

clip-rule rule

Choose from these rule types:

  evenodd
  nonzero

font name

font-family family

font-size point-size

font-stretch type

Choose from these stretch types:

  all
  normal
  ultra-condensed
  extra-condensed
  condensed
  semi-condensed
  semi-expanded
  expanded
  extra-expanded
  ultra-expanded

font-style style

Choose from these styles:

  all
  normal
  italic
  oblique

font-weight weight

Choose from these weights:

  all
  normal
  bold
  100
  200
  300
  400
  500
  600
  700
  800
  900

gradient-units units

Choose from these units:

  userSpace
  userSpaceOnUse
  objectBoundingBox

gravity type

Choose from these gravity types:

  NorthWest
  North
  NorthEast
  West
  Center
  East
  SouthWest
  South
  SouthEast

image compose x,y width,height 'filename'

Choose from these compose operations:

  Add
  Atop
  Bumpmap
  Clear
  CopyBlue
  CopyGreen
  CopyOpacity
  CopyRed
  Copy
  Difference
  In
  Minus
  Multiply
  Out
  Over
  Plus
  Subtract
  Xor

line x,y x1,y1

font-style x,y method

Choose from these methods:

  point
  replace
  floodfill
  filltoborder
  reset

line offset

line opacity

Use percent (e.g. 50%).

path path

point x,y

polygon x,y x1,y1, ..., xn,yn

polyline x,y x1,y1, ..., xn,yn

pop clip-path

pop defs

pop gradient

pop graphic-context

pop pattern

push clip-path name

push defs

push gradientid linear x,y x1,y1

push gradientid radial xc,cy xf,yf radius

push graphic-context

push patternid radial x,y width,height

rectanglex,y x1,y1

rotateangle

roundrectangle x,y x1,y1 width,height

scale x,y

skewX angle

skewX angle

stop-color color offset

stroke color

stroke-antialias 0 | 1

stroke-dasharray none | numeric-list

stroke-dashoffset offset

stroke-linecap type

Choose from these cap types:

  butt
  round
  square

stroke-linejoin type

Choose from these join types:

  butt
  miter
  round
  square

stroke-miterlimit limit

stroke-opacity opacity

stroke-width width

text "text"

text-antialias 0 | 1

text-undercolor color

translate x,y

viewbox x,y x1,y1

 
© 1999-2005 ImageMagick Studio LLC