App

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
mhr.appcore.filters.Filter Class Reference

Třída poskytuje jednotné rozhraní pro aplikaci nativních filtrů. More...

## Public Member Functions
| Filter ()
synchronized int | makeGaussianBlurFilter (double xSigma, double ySigma) throws FilterAllocationException
| Nastaví chování tohoto filtru tak, že bude představovat filtr TGaussianBlur.
synchronized int | makeLaplaceSharpenFilter (double force) throws FilterAllocationException
| Nastaví chování tohoto filtru tak, že bude představovat filtr TLaplaceSharpen.
synchronized int | makeGaussianSharpenFilter (double sigma, double force) throws FilterAllocationException
| Nastaví chování tohoto filtru tak, že bude představovat filtr TGaussianSharpen.
synchronized int | makeLaplacianOfGaussianSharpenFilter (double sigma, double force, boolean area) throws FilterAllocationException
| Nastaví chování tohoto filtru tak, že bude představovat filtr TLaplacianOfGaussianSharpen.
synchronized int | makeDifferenceOfGaussianSharpenFilter (double sigma, double k, double force, boolean area) throws FilterAllocationException
| Nastaví chování tohoto filtru tak, že bude představovat filtr TDifferenceOfGaussianSharpen.
synchronized void | dispose ()
| uvolní prostředky alokované instancí.
synchronized int | getExtraMargin ()
| Vrací velikost okraje filtru.
synchronized int | applyTo (NBitmap dst, Rect dstRect, double opacity) throws IllegalArgumentException
| Aplikuje filtr na bitmapu s nastavenou průhledností.
synchronized int | applyTo (NBitmap dst, NBitmap msk, Rect mskRect, int mskOrigX, int mskOrigY, double opacity) throws IllegalArgumentException
| Aplikuje filtr na bitmapu s nastavenou průhledností a přes danou masku.

## Static Public Attributes
static final double | opacityAsFul = 0.9999
| Nad tuto hodnotu se již neuvažuje průhlednost filtru.
static final double | opacityAsNone = 0.0001
| Pod tuto hodnotu se již filtr neaplikuje.

## Protected Member Functions
void | finalize () throws Throwable

## Static Protected Member Functions
static native int | disposeFilter (long adress)
static native long | createGaussianBlurFilter (double xSigma, double ySigma)
static native long | createLaplaceSharpenFilter (double force)
static native long | createGaussianSharpenFilter (double sigma, double force)
static native long | createLaplacianOfGaussianSharpenFilter (double sigma, double force, boolean area)
static native long | createDifferenceOfGaussianSharpenFilter (double sigma, double k, double force, boolean area)
static native int | applyTo (long filterAdress, long dstAdress, int dstTlx, int dstTly, int dstBrX, int dstBrY)
static native int | applyTo (long filterAdress, long dstAdress, int dstTlx, int dstTly, int dstBrX, int dstBrY, double alpha)
static native int | applyTo (long filterAdress, long dstAdress, long mskAdress, int mskTlx, int mskTly, int mskBrx, int mskBry, int mskOrigX, int mskOrigY)
static native int | applyTo (long filterAdress, long dstAdress, long mskAdress, int mskTlx, int mskTly, int mskBrx, int mskBry, int mskOrigX, int mskOrigY, double alpha)

## Protected Attributes
long | adress = 0x0
| Adresa nativního filtru.
int | extraMargin
| Velikost okrajové oblasti, jakou filtr vyžaduje pro svou aplikaci.

## Detailed Description

Třída poskytuje jednotné rozhraní pro aplikaci nativních filtrů.

Definition at line 15 of file Filter.java.

## Constructor & Destructor Documentation

mhr.appcore.filters.Filter.Filter | ( |  | ) |
| inline

Výchozí konstruktor, vytvoří neutrální filtr.

Definition at line 43 of file Filter.java.

{
extraMargin = 0;
}

## Member Function Documentation

static native int mhr.appcore.filters.Filter.applyTo | ( | long | filterAdress,
|  | long | dstAdress,
|  | int | dstTlx,
|  | int | dstTly,
|  | int | dstBrX,
|  | int | dstBrY
| ) |  |
| staticprotected

static native int mhr.appcore.filters.Filter.applyTo | ( | long | filterAdress,
|  | long | dstAdress,
|  | int | dstTlx,
|  | int | dstTly,
|  | int | dstBrX,
|  | int | dstBrY,
|  | double | alpha
| ) |  |
| staticprotected

static native int mhr.appcore.filters.Filter.applyTo | ( | long | filterAdress,
|  | long | dstAdress,
|  | long | mskAdress,
|  | int | mskTlx,
|  | int | mskTly,
|  | int | mskBrx,
|  | int | mskBry,
|  | int | mskOrigX,
|  | int | mskOrigY
| ) |  |
| staticprotected

static native int mhr.appcore.filters.Filter.applyTo | ( | long | filterAdress,
|  | long | dstAdress,
|  | long | mskAdress,
|  | int | mskTlx,
|  | int | mskTly,
|  | int | mskBrx,
|  | int | mskBry,
|  | int | mskOrigX,
|  | int | mskOrigY,
|  | double | alpha
| ) |  |
| staticprotected

synchronized int mhr.appcore.filters.Filter.applyTo | ( | NBitmap | dst,
|  | Rect | dstRect,
|  | double | opacity
| ) |  | throws IllegalArgumentException
| inline

Aplikuje filtr na bitmapu s nastavenou průhledností.

Parameters

  dst |
  dstRect |
  opacity |

Returns

Exceptions

  IllegalArgumentException |

Definition at line 202 of file Filter.java.

{
if (opacity < opacityAsNone) {
return 0;
}
if (adress == 0) {
return 1000;
}
BitmapInfo dstInfo = dst.getInfo();
if (dstInfo.channelCount == ChannelCount.FOUR_CHANNEL) {
if (opacity < opacityAsFul) {
return applyTo(adress, dst.getAdress(), dstRect.tlx, dstRect.tly, dstRect.brx, dstRect.bry, opacity);
} else {
return applyTo(adress, dst.getAdress(), dstRect.tlx, dstRect.tly, dstRect.brx, dstRect.bry);
}
} else {
throw new IllegalArgumentException("Operation is not applicable to supplied bitmap.");
}
}

synchronized int mhr.appcore.filters.Filter.applyTo | ( | NBitmap | dst,
|  | NBitmap | msk,
|  | Rect | mskRect,
|  | int | mskOrigX,
|  | int | mskOrigY,
|  | double | opacity
| ) |  | throws IllegalArgumentException
| inline

Aplikuje filtr na bitmapu s nastavenou průhledností a přes danou masku.

Parameters

  dst |
  msk |
  mskRect |
  mskOrigX |
  mskOrigY |
  opacity |

Returns

Exceptions

  IllegalArgumentException |

Definition at line 232 of file Filter.java.

{
if (opacity < opacityAsNone) {
return 0;
}
if (adress == 0) {
return 1000;
}
BitmapInfo dstInfo = dst.getInfo();
BitmapInfo mskInfo = msk.getInfo();
if (dstInfo.channelCount == ChannelCount.FOUR_CHANNEL && mskInfo.channelCount == ChannelCount.SINGLE_CHANNEL) {
if (opacity < opacityAsFul) {
return applyTo(adress, dst.getAdress(), msk.getAdress(), mskRect.tlx, mskRect.tly, mskRect.brx, mskRect.bry, mskOrigX, mskOrigY, opacity);
} else {
return applyTo(adress, dst.getAdress(), msk.getAdress(), mskRect.tlx, mskRect.tly, mskRect.brx, mskRect.bry, mskOrigX, mskOrigY);
}
} else {
throw new IllegalArgumentException("Operation is not applicable to supplied bitmap.");
}
}

static native long mhr.appcore.filters.Filter.createDifferenceOfGaussianSharpenFilter | ( | double | sigma,
|  | double | k,
|  | double | force,
|  | boolean | area
| ) |  |
| staticprotected

static native long mhr.appcore.filters.Filter.createGaussianBlurFilter | ( | double | xSigma,
|  | double | ySigma
| ) |  |
| staticprotected

static native long mhr.appcore.filters.Filter.createGaussianSharpenFilter | ( | double | sigma,
|  | double | force
| ) |  |
| staticprotected

static native long mhr.appcore.filters.Filter.createLaplaceSharpenFilter | ( | double | force | ) |
| staticprotected

static native long mhr.appcore.filters.Filter.createLaplacianOfGaussianSharpenFilter | ( | double | sigma,
|  | double | force,
|  | boolean | area
| ) |  |
| staticprotected

synchronized void mhr.appcore.filters.Filter.dispose | ( |  | ) |
| inline

uvolní prostředky alokované instancí.

Definition at line 162 of file Filter.java.

{
if (adress != 0) {
disposeFilter(adress);
adress = 0;
extraMargin = 0;
}
}

static native int mhr.appcore.filters.Filter.disposeFilter | ( | long | adress | ) |
| staticprotected

void mhr.appcore.filters.Filter.finalize | ( |  | ) | throws Throwable
| inlineprotected

Definition at line 33 of file Filter.java.

{
dispose();
super.finalize();
}

synchronized int mhr.appcore.filters.Filter.getExtraMargin | ( |  | ) |
| inline

Vrací velikost okraje filtru.

Returns

Definition at line 190 of file Filter.java.

{
return extraMargin;
}

synchronized int mhr.appcore.filters.Filter.makeDifferenceOfGaussianSharpenFilter | ( | double | sigma,
|  | double | k,
|  | double | force,
|  | boolean | area
| ) |  | throws FilterAllocationException
| inline

Nastaví chování tohoto filtru tak, že bude představovat filtr TDifferenceOfGaussianSharpen.

Parameters

  sigma | sigma prvniho rozostreni vetsi nez 0.35, aby vubec bylo, mensi neni podporovano
  k | sigma druheho (odecitaneho) rozostreni je nasobena timto faktorem
  force |
  area |

Returns

Exceptions

  FilterAllocationException |

Definition at line 144 of file Filter.java.

{
if (adress != 0) {
disposeFilter(adress);
adress = 0;
extraMargin = 0;
}
adress = createDifferenceOfGaussianSharpenFilter(sigma, k, force, area);
if (adress == 0) {
throw new FilterAllocationException("Could not allocate filter");
}
extraMargin = (int)(3 * sigma);
return 0;
}

synchronized int mhr.appcore.filters.Filter.makeGaussianBlurFilter | ( | double | xSigma,
|  | double | ySigma
| ) |  | throws FilterAllocationException
| inline

Nastaví chování tohoto filtru tak, že bude představovat filtr TGaussianBlur.

Parameters

  xSigma |
  ySigma |

Returns

Exceptions

  FilterAllocationException |

Definition at line 54 of file Filter.java.

{
if (adress != 0) {
disposeFilter(adress);
adress = 0;
extraMargin = 0;
}
adress = createGaussianBlurFilter(xSigma, ySigma);
if (adress == 0) {
throw new FilterAllocationException("Could not allocate filter");
}
extraMargin = Math.max((int)(3 * xSigma), (int)(3 * ySigma));
return 0;
}

synchronized int mhr.appcore.filters.Filter.makeGaussianSharpenFilter | ( | double | sigma,
|  | double | force
| ) |  | throws FilterAllocationException
| inline

Nastaví chování tohoto filtru tak, že bude představovat filtr TGaussianSharpen.

Parameters

  sigma |
  force |

Returns

Exceptions

  FilterAllocationException |

Definition at line 97 of file Filter.java.

{
if (adress != 0) {
disposeFilter(adress);
adress = 0;
extraMargin = 0;
}
adress = createGaussianSharpenFilter(sigma, force);
if (adress == 0) {
throw new FilterAllocationException("Could not allocate filter");
}
extraMargin = (int)(3 * sigma);
return 0;
}

synchronized int mhr.appcore.filters.Filter.makeLaplaceSharpenFilter | ( | double | force | ) | throws FilterAllocationException
| inline

Nastaví chování tohoto filtru tak, že bude představovat filtr TLaplaceSharpen.

Parameters

  force |

Returns

Exceptions

  FilterAllocationException |

Definition at line 75 of file Filter.java.

{
if (adress != 0) {
disposeFilter(adress);
adress = 0;
extraMargin = 0;
}
adress = createLaplaceSharpenFilter(force);
if (adress == 0) {
throw new FilterAllocationException("Could not allocate filter");
}
extraMargin = 3;
return 0;
}

synchronized int mhr.appcore.filters.Filter.makeLaplacianOfGaussianSharpenFilter | ( | double | sigma,
|  | double | force,
|  | boolean | area
| ) |  | throws FilterAllocationException
| inline

Nastaví chování tohoto filtru tak, že bude představovat filtr TLaplacianOfGaussianSharpen.

Parameters

  sigma |
  force |
  area |

Returns

Exceptions

  FilterAllocationException |

Definition at line 120 of file Filter.java.

{
if (adress != 0) {
disposeFilter(adress);
adress = 0;
extraMargin = 0;
}
adress = createLaplacianOfGaussianSharpenFilter(sigma, force, area);
if (adress == 0) {
throw new FilterAllocationException("Could not allocate filter");
}
extraMargin = (int)(3 * sigma);
return 0;
}

## Member Data Documentation

long mhr.appcore.filters.Filter.adress = 0x0
| protected

Adresa nativního filtru.

Definition at line 23 of file Filter.java.

int mhr.appcore.filters.Filter.extraMargin
| protected

Velikost okrajové oblasti, jakou filtr vyžaduje pro svou aplikaci.

Definition at line 24 of file Filter.java.

final double mhr.appcore.filters.Filter.opacityAsFul = 0.9999
| static

Nad tuto hodnotu se již neuvažuje průhlednost filtru.

Definition at line 26 of file Filter.java.

final double mhr.appcore.filters.Filter.opacityAsNone = 0.0001
| static

Pod tuto hodnotu se již filtr neaplikuje.

Definition at line 27 of file Filter.java.

The documentation for this class was generated from the following file:

- /home/xxx/eclipse_workspaces/app/appcore/src/mhr/appcore/filters/Filter.java