public class VertMirrorMapping extends PixelMapping { int flip = 0; public VertMirrorMapping(ComplexImage ci, PixelMapping ne){super(ci,ne);} public void setOrigin(int x,int y) { ox=x;oy=y; flip = 0; if (next!=null) next.setOrigin(x,y); } public boolean morePixels() { //System.out.println("Pixelmapping: morePixels returns :"+startAgain); //return startAgain; if (flip!=2) return true; if (next!=null) { return next.morePixels(); } else { return false; } } public PixelDesc nextPixel() { if (next == null) { System.out.println("never be called"); } else { if (flip==2) { if (next.morePixels()) { flip = 0; } else { return null; } } if (flip==0) { flip = 1; return next.nextPixel(); } else if (flip==1) { flip = 2; PixelDesc pd = next.nextPixel(); pd.y = complexImage.h - pd.y; return(pd); } } return null; } }