Revision 47593

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/marker/impl/AbstractMarkerSymbol.java
76 76
    private static final GeometryManager GEOMETRY_MANAGER = GeometryLocator.getGeometryManager();
77 77

  
78 78
    private Color color;
79
    private double rotation;
79
    private double rotationDegrees;
80 80
    private Point2D offset = new Point2D.Double();
81 81
    private double size = 4d;
82 82
    private IMask mask;
......
118 118

  
119 119
    @Override
120 120
    public double getRotation() {
121
        return rotation;
121
        return this.getRotationInDegrees();
122 122
    }
123 123

  
124 124
    @Override
125 125
    public void setRotation(double r) {
126
        this.rotation = r;
126
        this.setRotationInDegrees(r);
127
    }
128

  
129
    public double getRotationInDegrees() {
130
        return rotationDegrees;
131
    }
132

  
133
    public void setRotationInDegrees(double r) {
134
        this.rotationDegrees = r;
127 135
        this.setRotationExpression(null);
128 136
    }
129 137

  
138
    public double getRotationInRadians() {
139
        return Math.toRadians(rotationDegrees);
140
    }
141

  
142
    public void setRotationInRadians(double r) {
143
        this.rotationDegrees = Math.toDegrees(r);
144
        this.setRotationExpression(null);
145
    }
146

  
130 147
    @Override
131 148
    public Point2D getOffset() {
132 149
        if (offset == null) {
......
252 269
    @Override
253 270
    public double getEfectiveRotationInDegres(Feature f) {
254 271
        if (StringUtils.isBlank(this.rotationExpression)) {
255
            return Math.toDegrees(this.getRotation());
272
            return this.getRotationInDegrees();
256 273
        }
257 274
        // Por defecto vedra en grados.
258 275
        if (f == null) {
259 276
            f = this.getFeature();
260 277
        }
261 278
        if (f == null) {
262
            return Math.toDegrees(this.getRotation());
279
            return this.getRotationInDegrees();
263 280
        }
264 281
        double r = ExpressionUtils.parseDouble(
265 282
                this.getSymbolTable(f),
266 283
                rotationExpression,
267
                this.getRotation()
284
                this.getRotationInDegrees()
268 285
        );
269 286
        return r;
270 287
    }
......
273 290
    public double getEfectiveRotationInRadians(Feature f) {
274 291
        // Pillamos el valor por defecto que es en grados y lo transformamos a radianes.
275 292
        if (StringUtils.isBlank(this.rotationExpression)) {
276
            return this.getRotation();
293
            return this.getRotationInRadians();
277 294
        }
278 295
        double r = this.getEfectiveRotationInDegres(f);
279 296
        if (r == 0) {

Also available in: Unified diff