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