public static boolean eps_abs_eq(double f1, double f2) { if (f1 <0) f1 = -f1; if (f2 <0) f2 = -f2; return eps_eq(f1, f2); }
/** * Returns the source of the blur operation */ public Filter getSource(){ return (Filter)getSources().get(0); }
/** * Sets the source of the blur operation */ public void setSource(Filter src){ init(src, null); }
public GaussianBlurRable8Bit(Filter src, double stdevX, double stdevY) { super(src, null); setStdDeviationX(stdevX); setStdDeviationY(stdevY); }
if ((sdx < 10) && (sdy < 10) && eps_eq (sdx, sdy) && eps_abs_eq(sx/scaleX, sy/scaleY)) { aoi = getBounds2D(); ri = getSource().createRendering(new RenderContext(srcAt, r, rh)); if (ri == null) return null; CachableRed cr = convertSourceCS(ri);
(float)(outputRgn.getHeight()+2*radY)); Rectangle2D bounds = getBounds2D(); if ( ! outputRgn.intersects(bounds) ) return new Rectangle2D.Float();
/** * Grow the source's bounds */ public Rectangle2D getBounds2D(){ Rectangle2D src = getSource().getBounds2D(); float dX = (float)(stdDeviationX*DSQRT2PI); float dY = (float)(stdDeviationY*DSQRT2PI); float radX = 3*dX/2; float radY = 3*dY/2; return new Rectangle2D.Float ((float)(src.getMinX() -radX), (float)(src.getMinY() -radY), (float)(src.getWidth() +2*radX), (float)(src.getHeight()+2*radY)); }
Filter blur = new GaussianBlurRable8Bit (pad, stdDeviationXY[0], stdDeviationXY[1]);
if ((sdx < 10) && (sdy < 10) && eps_eq (sdx, sdy) && eps_abs_eq(sx/scaleX, sy/scaleY)) { aoi = getBounds2D(); ri = getSource().createRendering(new RenderContext(srcAt, r, rh)); if (ri == null) return null; CachableRed cr = convertSourceCS(ri);
public GaussianBlurRable8Bit(Filter src, double stdevX, double stdevY) { super(src, null); setStdDeviationX(stdevX); setStdDeviationY(stdevY); }
(float)(inputRgn.getHeight()+2*radY)); Rectangle2D bounds = getBounds2D(); if ( ! inputRgn.intersects(bounds) ) return new Rectangle2D.Float();
/** * Grow the source's bounds */ public Rectangle2D getBounds2D(){ Rectangle2D src = getSource().getBounds2D(); float dX = (float)(stdDeviationX*DSQRT2PI); float dY = (float)(stdDeviationY*DSQRT2PI); float radX = 3*dX/2; float radY = 3*dY/2; return new Rectangle2D.Float ((float)(src.getMinX() -radX), (float)(src.getMinY() -radY), (float)(src.getWidth() +2*radX), (float)(src.getHeight()+2*radY)); }
Filter blur = new GaussianBlurRable8Bit (pad, stdDeviationXY[0], stdDeviationXY[1]);
if ((sdx < 10) && (sdy < 10) && eps_eq (sdx, sdy) && eps_abs_eq(sx/scaleX, sy/scaleY)) { aoi = getBounds2D(); ri = getSource().createRendering(new RenderContext(srcAt, r, rh)); if (ri == null) return null; CachableRed cr = convertSourceCS(ri);
public GaussianBlurRable8Bit(Filter src, double stdevX, double stdevY) { super(src, null); setStdDeviationX(stdevX); setStdDeviationY(stdevY); }
(float)(inputRgn.getHeight()+2*radY)); Rectangle2D bounds = getBounds2D(); if ( ! inputRgn.intersects(bounds) ) return new Rectangle2D.Float();
/** * Sets the source of the blur operation */ public void setSource(Filter src){ init(src, null); }
public static boolean eps_abs_eq(double f1, double f2) { if (f1 <0) f1 = -f1; if (f2 <0) f2 = -f2; return eps_eq(f1, f2); }
/** * Returns the source of the blur operation */ public Filter getSource(){ return (Filter)getSources().get(0); }
/** * Grow the source's bounds */ public Rectangle2D getBounds2D(){ Rectangle2D src = getSource().getBounds2D(); float dX = (float)(stdDeviationX*DSQRT2PI); float dY = (float)(stdDeviationY*DSQRT2PI); float radX = 3*dX/2; float radY = 3*dY/2; return new Rectangle2D.Float ((float)(src.getMinX() -radX), (float)(src.getMinY() -radY), (float)(src.getWidth() +2*radX), (float)(src.getHeight()+2*radY)); }