Vector graphics

From GMpedia.org Wiki

Jump to: navigation, search

Vector graphics are graphics that are represented by shapes, rather than by pixels, as is the case with raster graphics.

[edit] Example

A rendered version of the XML below.
A rendered version of the XML below.

An example of a vector graphics file format is SVG (Scalable Vector Graphics). Since SVG files are an application of XML they are edited as plain-text files. Below is an example of a vector graphic in SVG format:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.0" width="200" height="200">
 <defs>
   <linearGradient x2="1" id="orange_red">
     <stop style="stop-color:#ff0;stop-opacity:1" offset="0" />
     <stop style="stop-color:#808000;stop-opacity:1" offset="1" />
   </linearGradient>
 </defs>
 <rect width="200" height="200" style="fill:url(#orange_red)" />
 <circle cx="67" cy="66.6" r="50" style="opacity:0.7;fill:#f00;stroke:#000;stroke-width:1" />

 <circle cx="133" cy="67" r="50" style="opacity:0.7;fill:#0f0;stroke:#000;stroke-width:1" />
 <circle cx="100" cy="133" r="50" style="opacity:0.7;fill:#00f;stroke:#000;stroke-width:1" />
</svg>

[edit] See Also



This article is a stub, please help GMpedia expand it.
Personal tools