~ubuntu-branches/debian/squeeze/latexdraw/squeeze

« back to all changes in this revision

Viewing changes to latexDraw/parsers/svg/elements/path/SVGPathSeg.java

  • Committer: Bazaar Package Importer
  • Author(s): Stuart Prescott
  • Date: 2009-05-03 23:49:35 UTC
  • Revision ID: james.westby@ubuntu.com-20090503234935-cls7n48x018g0vk2
Tags: upstream-2.0.2+1
ImportĀ upstreamĀ versionĀ 2.0.2+1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package latexDraw.parsers.svg.elements.path;
 
2
 
 
3
/**
 
4
 * Defines a model for the SVGPath segments.<br>
 
5
 *<br>
 
6
 * This file is part of LaTeXDraw.<br>
 
7
 * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
 
8
 *<br>
 
9
 *  LaTeXDraw is free software; you can redistribute it and/or modify
 
10
 *  it under the terms of the GNU General Public License as published by
 
11
 *  the Free Software Foundation; either version 2 of the License, or
 
12
 *  (at your option) any later version.<br>
 
13
 *<br>
 
14
 *  LaTeXDraw is distributed without any warranty; without even the 
 
15
 *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
 
16
 *  PURPOSE. See the GNU General Public License for more details.<br>
 
17
 *<br>
 
18
 * 10/20/07<br>
 
19
 * @author Arnaud BLOUIN<br>
 
20
 * @version 0.1<br>
 
21
 * @since 0.1
 
22
 */
 
23
public abstract class SVGPathSeg
 
24
{
 
25
        public static enum PathSeg { UNKNOWN, CLOSEPATH, MOVETO_ABS, MOVETO_REL, 
 
26
                                                                LINETO_ABS, LINETO_REL, CURVETO_CUBIC_ABS, CURVETO_CUBIC_REL,
 
27
                                                                CURVETO_QUADRATIC_ABS, CURVETO_QUADRATIC_REL, ARC_ABS,
 
28
                                                                ARC_REL, LINETO_HORIZONTAL_ABS, LINETO_HORIZONTAL_REL,
 
29
                                                                LINETO_VERTICAL_ABS, LINETO_VERTICAL_REL, CURVETO_CUBIC_SMOOTH_ABS,
 
30
                                                                CURVETO_CUBIC_SMOOTH_REL, CURVETO_QUADRATIC_SMOOTH_ABS, 
 
31
                                                                CURVETO_QUADRATIC_SMOOTH_REL }
 
32
 
 
33
        
 
34
        /** Defines if the segment path is relative or absolute. @since 0.1 */
 
35
        protected boolean isRelative;
 
36
 
 
37
        /** The type of the segment path. @since 0.1 */
 
38
        protected PathSeg type;
 
39
        
 
40
        
 
41
        /**
 
42
         * The main constructor.
 
43
         * @param isRelative True: the path segment is relative, false it is absolute.
 
44
         * @since 0.1
 
45
         */
 
46
        public SVGPathSeg(boolean isRelative)
 
47
        {
 
48
                this.isRelative = isRelative;
 
49
        }
 
50
        
 
51
        
 
52
        
 
53
        /**
 
54
         * @return The type of the segment path.
 
55
         * @since 0.1
 
56
         */
 
57
        public abstract PathSeg getType();
 
58
        
 
59
        
 
60
        
 
61
        /**
 
62
         * @return the isRelative.
 
63
         * @since 0.1
 
64
         */
 
65
        public boolean isRelative()
 
66
        {
 
67
                return isRelative;
 
68
        }
 
69
 
 
70
        
 
71
        /**
 
72
         * @param isRelative the isRelative to set.
 
73
         * @since 0.1
 
74
         */
 
75
        public void setRelative(boolean isRelative)
 
76
        {
 
77
                this.isRelative = isRelative;
 
78
        }
 
79
}