1 package mhr.appcore.filters;
3 import android.location.Address;
4 import android.nfc.NfcAdapter.CreateBeamUrisCallback;
5 import mhr.appcore.bitmap.BitmapInfo;
6 import mhr.appcore.bitmap.ChannelCount;
7 import mhr.appcore.bitmap.NBitmap;
8 import mhr.appcore.exceptions.AlreadyDisposedException;
9 import mhr.appcore.utils.NotImplementedException;
10 import mhr.appcore.utils.Rect;
65 extraMargin = Math.max((
int)(3 * xSigma), (
int)(3 * ySigma));
180 protected static native
int applyTo(
long filterAdress,
long dstAdress,
int dstTlx,
int dstTly,
int dstBrX,
int dstBrY);
181 protected static native
int applyTo(
long filterAdress,
long dstAdress,
int dstTlx,
int dstTly,
int dstBrX,
int dstBrY,
double alpha);
182 protected static native
int applyTo(
long filterAdress,
long dstAdress,
long mskAdress,
int mskTlx,
int mskTly,
int mskBrx,
int mskBry,
int mskOrigX,
int mskOrigY);
183 protected static native
int applyTo(
long filterAdress,
long dstAdress,
long mskAdress,
int mskTlx,
int mskTly,
int mskBrx,
int mskBry,
int mskOrigX,
int mskOrigY,
double alpha);
202 public synchronized int applyTo(
NBitmap dst,
Rect dstRect,
double opacity)
throws IllegalArgumentException {
212 return applyTo(
adress, dst.getAdress(), dstRect.tlx, dstRect.tly, dstRect.brx, dstRect.bry, opacity);
214 return applyTo(
adress, dst.getAdress(), dstRect.tlx, dstRect.tly, dstRect.brx, dstRect.bry);
217 throw new IllegalArgumentException(
"Operation is not applicable to supplied bitmap.");
232 public synchronized int applyTo(
NBitmap dst,
NBitmap msk,
Rect mskRect,
int mskOrigX,
int mskOrigY,
double opacity)
throws IllegalArgumentException {
243 return applyTo(
adress, dst.getAdress(), msk.getAdress(), mskRect.tlx, mskRect.tly, mskRect.brx, mskRect.bry, mskOrigX, mskOrigY, opacity);
245 return applyTo(
adress, dst.getAdress(), msk.getAdress(), mskRect.tlx, mskRect.tly, mskRect.brx, mskRect.bry, mskOrigX, mskOrigY);
248 throw new IllegalArgumentException(
"Operation is not applicable to supplied bitmap.");