View Javadoc

1   /**********************************************
2    * Copyright (C) 2009 Lukas Laag
3    * This file is part of Vectomatic.
4    * 
5    * Vectomatic is free software: you can redistribute it and/or modify
6    * it under the terms of the GNU General Public License as published by
7    * the Free Software Foundation, either version 3 of the License, or
8    * (at your option) any later version.
9    * 
10   * Vectomatic is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   * GNU General Public License for more details.
14   * 
15   * You should have received a copy of the GNU General Public License
16   * along with Vectomatic.  If not, see http://www.gnu.org/licenses/
17   **********************************************/
18  package org.vectomatic.common.format;
19  
20  import org.vectomatic.common.model.Shape;
21  import org.vectomatic.common.model.style.PaletteList;
22  
23  /**
24   * Interface for SVG exporters
25   */
26  public interface ISVGExporter {
27  	public static final String NS = "http://www.w3.org/2000/svg";
28  	
29  	public static final String ELT_SVG = "svg";
30  	public static final String ELT_RECT = "rect";
31  	public static final String ELT_ELLIPSE = "ellipse";
32  	public static final String ELT_POLYLINE = "polyline";
33  	public static final String ELT_POLYGON = "polygon";
34  	public static final String ELT_G = "g";
35  	public static final String ELT_DEFS = "defs";
36  	public static final String ELT_DESC = "desc";
37  	public static final String ELT_TITLE = "title";
38  	public static final String ELT_SOLIDCOLOR = "solidColor";
39  	public static final String ELT_PATH = "path";
40  	
41  	public static final String ATT_VERSION = "version";
42  	public static final String ATT_X = "x";
43  	public static final String ATT_Y = "y";
44  	public static final String ATT_CX = "cx";
45  	public static final String ATT_CY = "cy";
46  	public static final String ATT_RX = "rx";
47  	public static final String ATT_RY = "ry";
48  	public static final String ATT_WIDTH = "width";
49  	public static final String ATT_HEIGHT = "height";
50  	public static final String ATT_POINTS = "points";
51  	public static final String ATT_TRANSFORM = "transform";
52  	public static final String ATT_STROKE = "stroke";
53  	public static final String ATT_STROKEOPACITY = "stroke-opacity";
54  	public static final String ATT_STROKEWIDTH = "stroke-width";
55  	public static final String ATT_FILL = "fill";
56  	public static final String ATT_FILLOPACITY = "fill-opacity";
57  	public static final String ATT_BASEPROFILE = "baseProfile";
58  	public static final String ATT_VECTOREFFECT = "vector-effect";
59  	public static final String ATT_SOLIDCOLOR = "solid-color";
60  	public static final String ATT_SOLIDOPACITY = "solid-opacity";
61  	public static final String ATT_ID = "xml:id";
62  	public static final String ATT_D = "d";
63  	
64  	public static final String VAL_NON_SCALING_STROKE="non-scaling-stroke";
65  	public static final String VAL_MOVE_TO="M";
66  	public static final String VAL_LINE_TO="L";
67  	public static final String VAL_CURVE_TO="C";
68  	public static final String VAL_NONE="none";
69  	
70  	public void writeSVG(IOutputStream stream, Shape[] shapes, PaletteList paletteList, int width, int height);
71  }