public void actionPerformed(ActionEvent e) { if (match(e, printPoints_mi)) { printPoints(); return; } if (match(e, fishEye_mi)) { xf.fishEye(); return; } if (match(e, zedSquare_mi)) { xf.zedSquare(); return; } if (match(e, colorize_mi)) { ColorGridFrame cgf = new ColorGridFrame(this); return; } if (match(e, sqrt_mi)) { xf.sqrt(); return; } if (match(e, polarTransform_mi)) { xf.polarTransform(); return; } if (match(e, movePointd_mi)) { pointToMove = -1; return; } if (match(e, movePoint0_mi)) { pointToMove = 0; return; } if (match(e, movePoint1_mi)) { pointToMove = 1; return; } if (match(e, movePoint2_mi)) { pointToMove = 2; return; } if (match(e, movePoint3_mi)) { pointToMove = 3; return; } if (match(e, applyBilinear4Points_mi)) { xf.revert(); xf.applyBilinear4Points(); return; } if (match(e, revert_mi)) { revert(); return; } if (match(e, rotate_mi)) { selection = rotate_mi; return; } if (match(e, xformFeedback_mi)) { xformFeedback(); return; } if (match(e, apply_mi)) { apply(); return; } if (match(e, shearRotate_mi)) { selection = shearRotate_mi; return; } if (match(e, scaleRotate_mi)) { selection = scaleRotate_mi; return; } if (match(e, scale_mi)) { selection = scale_mi; return; } if (match(e, scalex_mi)) { selection = scalex_mi; return; } if (match(e, scaley_mi)) { selection = scaley_mi; return; } if (match(e, shearx_mi)) { selection = shearx_mi; return; } if (match(e, sheary_mi)) { selection = sheary_mi; return; } super.actionPerformed(e); }
private void revert() { xf.revertNoResize(); p = new Polygon(); init(); repaint(); }
public void apply() { p = at.transform(p); xf.xform(at); }
public void xformFeedback() { xf.applyBilinear4PointsFeedback(); }