Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.geometry / org.gvsig.fmap.geometry.api / src / main / java / org / gvsig / fmap / geom / primitive / IGeneralPathX.java @ 45673

History | View | Annotate | Download (2.87 KB)

1
/*
2
 * To change this license header, choose License Headers in Project Properties.
3
 * To change this template file, choose Tools | Templates
4
 * and open the template in the editor.
5
 */
6

    
7
package org.gvsig.fmap.geom.primitive;
8

    
9
import java.awt.Rectangle;
10
import java.awt.Shape;
11
import java.awt.geom.AffineTransform;
12
import java.awt.geom.PathIterator;
13
import java.awt.geom.Point2D;
14
import java.awt.geom.Rectangle2D;
15
import org.cresques.cts.ICoordTrans;
16

    
17
/**
18
 *
19
 * @author usuario
20
 */
21
public interface IGeneralPathX {
22
    byte SEG_CLOSE = (byte) PathIterator.SEG_CLOSE;
23
    byte SEG_CUBICTO = (byte) PathIterator.SEG_CUBICTO;
24
    byte SEG_LINETO = (byte) PathIterator.SEG_LINETO;
25
    byte SEG_MOVETO = (byte) PathIterator.SEG_MOVETO;
26
    byte SEG_QUADTO = (byte) PathIterator.SEG_QUADTO;
27
    
28
    /**
29
     * An even-odd winding rule for determining the interior of
30
     * a path.
31
     */
32
    int WIND_EVEN_ODD = PathIterator.WIND_EVEN_ODD;
33
    /**
34
     * A non-zero winding rule for determining the interior of a
35
     * path.
36
     */
37
    int WIND_NON_ZERO = PathIterator.WIND_NON_ZERO;
38
    int[] curvesize = {1, 1, 2, 3, 0};
39

    
40
    void addSegment(Point[] segment);
41

    
42
    void append(PathIterator pi, boolean connect);
43
    
44
    public void append(GeneralPathX gp);
45

    
46
    Object clone();
47

    
48
    void closePath();
49

    
50
    boolean contains(double x, double y);
51

    
52
    boolean contains(Point2D p);
53

    
54
    boolean contains(double x, double y, double w, double h);
55

    
56
    boolean contains(Rectangle2D r);
57

    
58
    Shape createTransformedShape(AffineTransform at);
59

    
60
    void curveTo(double x1, double y1, double x2, double y2, double x3, double y3);
61

    
62
    void curveTo(Point point1, Point point2, Point point3);
63

    
64
    void flip();
65

    
66
    double[] get3DCoordinatesAt(int index);
67

    
68
    Rectangle getBounds();
69

    
70
    Rectangle2D getBounds2D();
71

    
72
    double[] getCoordinatesAt(int index);
73

    
74
    Point2D getCurrentPoint();
75

    
76
    int getNumCoords();
77

    
78
    int getNumTypes();
79

    
80
    PathIterator getPathIterator(AffineTransform at);
81

    
82
    PathIterator getPathIterator(AffineTransform at, double flatness);
83

    
84
    Point getPointAt(int index);
85

    
86
    double[] getPointCoords();
87

    
88
    byte[] getPointTypes();
89

    
90
    byte getTypeAt(int index);
91

    
92
    int getWindingRule();
93

    
94
    boolean intersects(double x, double y, double w, double h);
95

    
96
    boolean intersects(Rectangle2D r);
97

    
98
    boolean isCCW();
99

    
100
    boolean isClosed();
101

    
102
    boolean isSimple();
103

    
104
    void lineTo(double x, double y);
105

    
106
    void lineTo(Point point);
107

    
108
    void moveTo(double x, double y);
109

    
110
    void moveTo(Point point);
111

    
112
    void quadTo(double x1, double y1, double x2, double y2);
113

    
114
    void quadTo(Point point1, Point point2);
115

    
116
    void reProject(ICoordTrans ct);
117

    
118
    void reset();
119

    
120
    int setNumCoords(int numCoords);
121

    
122
    void setNumTypes(int numTypes);
123

    
124
    void setPointCoords(double[] pointCoords);
125

    
126
    void setPointTypes(byte[] pointTypes);
127

    
128
    void setWindingRule(int rule);
129

    
130
    void transform(AffineTransform at);
131
    
132
}