Statistics
| Revision:

root / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / core / ShapeFactory.java @ 379

History | View | Annotate | Download (1.27 KB)

1
/* Generated by Together */
2

    
3
package com.iver.cit.gvsig.fmap.core;
4

    
5

    
6
/**
7
 * Clase que crea las geometr?as, contendra un m?todo create por cada tipo de geometria que soporte gvSIG 
8
 */
9
public class ShapeFactory {
10
    public static IGeometry createPoint2D(double x, double y  ) {
11
            return new FGeometry(new FPoint2D(x,y));
12
    }
13
    
14
    public static IGeometry createMultipoint2D(double[] x, double[] y){
15
               return new FMultiPoint2D(x,y);
16
    }
17

    
18
    public static IGeometry createPoint3D(double x, double y, double z) {
19
            return new FGeometry(new FPoint3D(x,y,z));
20
    }
21

    
22
    public static IGeometry createMultipoint3D(double[] x, double[] y, double[] z) {
23
            return new FMultipoint3D(x,y,z);
24
    }
25

    
26
    public static IGeometry createPolyline2D(GeneralPathX shape) {
27
            return new FGeometry(new FPolyline2D(shape));
28
    }
29
    public static IGeometry createPolyline3D(GeneralPathX shape,double[] pZ) {
30
            return new FGeometry(new FPolyline3D(shape,pZ));
31
    }
32
    
33
    public static IGeometry createPolygon2D(GeneralPathX shape){
34
            return new FGeometry(new FPolygon2D(shape));
35
    }
36
    public static IGeometry createLabel(String text, boolean scaled, FPoint2D pos, int height) {
37
            //TODO implementar bien
38
            return new FGeometry(new FLabel(text,scaled,pos,height));
39
    }
40
}