001/*
002 * To change this template, choose Tools | Templates
003 * and open the template in the editor.
004 */
005
006package armyc2.c2sd.renderer.utilities;
007
008//import android.graphics.Point;
009import android.graphics.PointF;
010//import armyc2.c2sd.graphics2d.Point2D;
011//import armyc2.c2sd.graphics2d.Point2D;
012import armyc2.c2sd.graphics2d.*;
013
014/**
015 * Makes no change to the passed points.  Useful for when the points
016 * are already in pixels.
017 * @author michael.spinelli
018 */
019public class PointConversionDummy implements IPointConversion {
020
021
022    public PointConversionDummy()
023    {
024    }
025
026    public PointF PixelsToGeo(PointF pixel)
027    {
028        PointF coords = new PointF();
029
030        coords.x = pixel.x;
031        coords.y = pixel.y;
032
033        return coords;
034    }
035
036    public PointF GeoToPixels(PointF coord)
037    {
038        PointF pixel = new PointF();
039
040        pixel.x = (int)coord.x;
041
042        pixel.y = (int)coord.y;
043
044        return pixel;
045    }
046
047//      @Override
048//      public Point2D PixelsToGeo(Point pixel) {
049//              return new Point2D.Double(pixel.x,pixel.y);
050//      }
051
052//      @Override
053//      public Point GeoToPixels(Point2D coord) {
054//
055//              return new Point((int)coord.getX(),(int)coord.getY());
056//      }
057
058        @Override
059        public Point2D PixelsToGeo(Point2D pixel) {
060
061                return new Point2D.Double(pixel.getX(),pixel.getY());
062        }
063
064        //@Override
065        public Point2D GeoToPixels(Point2D coord) {
066
067                return new Point2D.Double(coord.getX(),coord.getY());
068        }
069
070
071
072}