use of com.aviary.android.feather.library.filters.BorderFilter in project mobile-android by photo.
the class BordersPanel method loadNativeFilter.
protected INativeFilter loadNativeFilter(final EffectPack pack, int position, final CharSequence label, boolean hires) {
BorderFilter filter = (BorderFilter) FilterLoaderFactory.get(Filters.BORDERS);
filter.setBorderName(label);
filter.setHiRes(hires);
IPlugin plugin = pack.mPluginRef;
if (null != plugin) {
if (plugin instanceof InternalPlugin) {
filter.setSourceApp(((InternalPlugin) plugin).getSourceDir(mPluginType));
// border size
int[] sizes = ((InternalPlugin) plugin).listBordersWidths();
position -= pack.getIndex();
if (null != sizes && sizes.length > (position - 1) && position > 0) {
int borderSize = sizes[position - 1];
filter.setSize((double) borderSize / 100.0);
}
}
}
return filter;
}
Aggregations