android:id="@+id/flipButton"
style="@style/FilterShowBottomButton"
android:src="@drawable/filtershow_button_geometry_flip"
- android:text="@string/flip" />
+ android:text="@string/mirror" />
<com.android.gallery3d.filtershow.ui.ImageButtonTitle
android:id="@+id/redEyeButton"
android:text="@string/exposure" />
<com.android.gallery3d.filtershow.ui.ImageButtonTitle
- android:id="@+id/vibranceButton"
+ android:id="@+id/vignetteButton"
style="@style/FilterShowBottomButton"
- android:src="@drawable/filtershow_button_colors_contrast"
- android:text="@string/vibrance" />
+ android:src="@drawable/filtershow_button_colors_vignette"
+ android:text="@string/vignette" />
<com.android.gallery3d.filtershow.ui.ImageButtonTitle
android:id="@+id/contrastButton"
android:text="@string/shadow_recovery" />
<com.android.gallery3d.filtershow.ui.ImageButtonTitle
- android:id="@+id/vignetteButton"
+ android:id="@+id/vibranceButton"
style="@style/FilterShowBottomButton"
- android:src="@drawable/filtershow_button_colors_vignette"
- android:text="@string/vignette" />
+ android:src="@drawable/filtershow_button_colors_contrast"
+ android:text="@string/vibrance" />
<com.android.gallery3d.filtershow.ui.ImageButtonTitle
android:id="@+id/sharpenButton"
style="@style/FilterShowBottomButton"
android:src="@drawable/filtershow_button_colors_sharpen"
- android:text="@string/sharpen" />
+ android:text="@string/sharpness" />
<com.android.gallery3d.filtershow.ui.ImageButtonTitle
android:id="@+id/curvesButtonRGB"
<!-- Label for the exposure filter button [CHAR LIMIT=15] -->
<string name="exposure">Exposure</string>
<!-- Label for the sharpen filter button [CHAR LIMIT=15] -->
- <string name="sharpen">Sharpen</string>
+ <string name="sharpness">Sharpness</string>
<!-- Label for the contrast filter button [CHAR LIMIT=15] -->
<string name="contrast">Contrast</string>
<!-- Label for the vibrance filter button [CHAR LIMIT=15] -->
<!-- Label for the saturation filter button [CHAR LIMIT=15] -->
<string name="saturation">Saturation</string>
<!-- Label for the White Balance filter button [CHAR LIMIT=15] -->
- <string name="wbalance">White Balance</string>
+ <string name="wbalance">Autocolor</string>
<!-- Label for the Hue filter button [CHAR LIMIT=15] -->
<string name="hue">Hue</string>
<!-- Label for the shadow recovery filter button [CHAR LIMIT=15] -->
<!-- Label for the rotate effect [CHAR LIMIT=15] -->
<string name="rotate" msgid="460017689320955494">Rotate</string>
<!-- Label for the flip effect [CHAR LIMIT=15] -->
- <string name="flip" msgid="2357692401826287480">Flip</string>
+ <string name="mirror">Mirror</string>
+ <!-- Label for the original [CHAR LIMIT=15] -->
+ <string name="none">None</string>
<!-- Labels for the curves tool -->
<!-- String for filter filtershow_fx_0002_bleach [CHAR LIMIT=14] -->
<string name="ffx_bleach">Bleach</string>
<!-- String for filter filtershow_fx_0003_blue_crush [CHAR LIMIT=14] -->
- <string name="ffx_blue_crush">Blue Crush</string>
+ <string name="ffx_blue_crush">Blue</string>
<!-- String for filter filtershow_fx_0004_bw_contrast [CHAR LIMIT=14] -->
- <string name="ffx_bw_contrast">BW Contrast</string>
+ <string name="ffx_bw_contrast">B/W</string>
<!-- String for filter filtershow_fx_0005_punch [CHAR LIMIT=14] -->
<string name="ffx_punch">Punch</string>
<!-- String for filter filtershow_fx_0006_x_process [CHAR LIMIT=14] -->
<string name="ffx_x_process">X Process</string>
<!-- String for filter filtershow_fx_0007_washout [CHAR LIMIT=14] -->
- <string name="ffx_washout">Washout</string>
+ <string name="ffx_washout">Latte</string>
<!-- String for filter filtershow_fx_0008_washout_color [CHAR LIMIT=14] -->
- <string name="ffx_washout_color">Washout Color</string>
+ <string name="ffx_washout_color">Litho</string>
<!-- Toast message shown after we make some album(s) available offline [CHAR LIMIT=50] -->
<plurals name="make_albums_available_offline">
listColors.removeView(v);
filters[i].setParameter(100);
+ if(v instanceof ImageButtonTitle)
+ filters[i].setName(((ImageButtonTitle) v).getText());
fView.setImageFilter(filters[i]);
fView.setController(this);
fView.setImageLoader(mImageLoader);
fView.setId(recastIDs[i]);
-
mPanelController.addComponent(mColorsButton, fView);
listColors.addView(fView, pos);
}
R.drawable.filtershow_button_colors_sharpen,
R.drawable.filtershow_button_colors_curve
};
- int[] overlayNames = {
- R.string.sharpen,
+ int []overlayNames = {
+ R.string.sharpness,
R.string.curvesRGB
};
fView.setController(this);
fView.setImageLoader(mImageLoader);
fView.setId(overlayIDs[i]);
-
mPanelController.addComponent(mColorsButton, fView);
listColors.addView(fView, pos);
}
int p = 0;
int[] drawid = {
+ R.drawable.filtershow_fx_0005_punch,
R.drawable.filtershow_fx_0000_vintage,
- R.drawable.filtershow_fx_0001_instant,
- R.drawable.filtershow_fx_0002_bleach,
- R.drawable.filtershow_fx_0003_blue_crush,
R.drawable.filtershow_fx_0004_bw_contrast,
- R.drawable.filtershow_fx_0005_punch,
- R.drawable.filtershow_fx_0006_x_process,
+ R.drawable.filtershow_fx_0002_bleach,
+ R.drawable.filtershow_fx_0001_instant,
R.drawable.filtershow_fx_0007_washout,
- R.drawable.filtershow_fx_0008_washout_color
+ R.drawable.filtershow_fx_0003_blue_crush,
+ R.drawable.filtershow_fx_0008_washout_color,
+ R.drawable.filtershow_fx_0006_x_process
};
int[] fxNameid = {
+ R.string.ffx_punch,
R.string.ffx_vintage,
- R.string.ffx_instant,
- R.string.ffx_bleach,
- R.string.ffx_blue_crush,
R.string.ffx_bw_contrast,
- R.string.ffx_punch,
- R.string.ffx_x_process,
+ R.string.ffx_bleach,
+ R.string.ffx_instant,
R.string.ffx_washout,
+ R.string.ffx_blue_crush,
R.string.ffx_washout_color,
+ R.string.ffx_x_process
};
ImagePreset preset = new ImagePreset(); // empty
filter.setSelected(true);
mCurrentImageSmallFilter = filter;
- filter.setImageFilter(new ImageFilterFx(null, getString(R.string.ffx_original)));
+ filter.setImageFilter(new ImageFilterFx(null,getString(R.string.none)));
filter.setController(this);
filter.setImageLoader(mImageLoader);
public void ensureFilter(String name) {
ImagePreset preset = getImagePreset();
ImageFilter filter = preset.getFilter(name);
- if (filter == null && name.equalsIgnoreCase("Vignette")) {
+ if (filter == null
+ && name.equalsIgnoreCase(mCurrentImage.getContext().getString(R.string.vignette))) {
filter = setImagePreset(new ImageFilterVignette(), name);
}
- if (filter == null && name.equalsIgnoreCase("Sharpen")) {
+ if (filter == null
+ && name.equalsIgnoreCase(mCurrentImage.getContext().getString(R.string.sharpness))) {
filter = setImagePreset(new ImageFilterSharpen(), name);
}
- if (filter == null && name.equalsIgnoreCase("Contrast")) {
+ if (filter == null
+ && name.equalsIgnoreCase(mCurrentImage.getContext().getString(R.string.contrast))) {
filter = setImagePreset(new ImageFilterContrast(), name);
}
- if (filter == null && name.equalsIgnoreCase("Saturated")) {
+ if (filter == null
+ && name.equalsIgnoreCase(mCurrentImage.getContext().getString(R.string.saturation))) {
filter = setImagePreset(new ImageFilterSaturated(), name);
}
- if (filter == null && name.equalsIgnoreCase("Hue")) {
+ if (filter == null
+ && name.equalsIgnoreCase(mCurrentImage.getContext().getString(R.string.hue))) {
filter = setImagePreset(new ImageFilterHue(), name);
}
- if (filter == null && name.equalsIgnoreCase("Exposure")) {
+ if (filter == null
+ && name.equalsIgnoreCase(mCurrentImage.getContext().getString(R.string.exposure))) {
filter = setImagePreset(new ImageFilterExposure(), name);
}
- if (filter == null && name.equalsIgnoreCase("Vibrance")) {
+ if (filter == null
+ && name.equalsIgnoreCase(mCurrentImage.getContext().getString(R.string.vibrance))) {
filter = setImagePreset(new ImageFilterVibrance(), name);
}
- if (filter == null && name.equalsIgnoreCase("Shadows")) {
+ if (filter == null
+ && name.equalsIgnoreCase(mCurrentImage.getContext().getString(
+ R.string.shadow_recovery))) {
filter = setImagePreset(new ImageFilterShadows(), name);
}
- if (filter == null && name.equalsIgnoreCase("Redeye")) {
+ if (filter == null
+ && name.equalsIgnoreCase(mCurrentImage.getContext().getString(R.string.redeye))) {
filter = setImagePreset(new ImageFilterRedEye(), name);
}
- if (filter == null && name.equalsIgnoreCase("WBalance")) {
+ if (filter == null
+ && name.equalsIgnoreCase(mCurrentImage.getContext().getString(R.string.wbalance))) {
filter = setImagePreset(new ImageFilterWBalance(), name);
}
mMasterImage.setCurrentFilter(filter);
}
case R.id.flipButton: {
mCurrentImage = showImageView(R.id.imageFlip);
- String ename = mCurrentImage.getContext().getString(R.string.flip);
+ String ename = mCurrentImage.getContext().getString(R.string.mirror);
mUtilityPanel.setEffectName(ename);
mUtilityPanel.setShowParameter(false);
break;
mCurrentImage = showImageView(R.id.imageShow).setShowControls(true);
String ename = mCurrentImage.getContext().getString(R.string.vignette);
mUtilityPanel.setEffectName(ename);
- ensureFilter("Vignette");
+ ensureFilter(ename);
break;
}
case R.id.curvesButtonRGB: {
}
case R.id.sharpenButton: {
mCurrentImage = showImageView(R.id.imageZoom).setShowControls(true);
- String ename = mCurrentImage.getContext().getString(R.string.sharpen);
+ String ename = mCurrentImage.getContext().getString(R.string.sharpness);
mUtilityPanel.setEffectName(ename);
- ensureFilter("Sharpen");
+ ensureFilter(ename);
break;
}
case R.id.contrastButton: {
mCurrentImage = showImageView(R.id.imageShow).setShowControls(true);
String ename = mCurrentImage.getContext().getString(R.string.contrast);
mUtilityPanel.setEffectName(ename);
- ensureFilter("Contrast");
+ ensureFilter(ename);
break;
}
case R.id.saturationButton: {
mCurrentImage = showImageView(R.id.imageShow).setShowControls(true);
String ename = mCurrentImage.getContext().getString(R.string.saturation);
mUtilityPanel.setEffectName(ename);
- ensureFilter("Saturated");
+ ensureFilter(ename);
break;
}
case R.id.wbalanceButton: {
String ename = mCurrentImage.getContext().getString(R.string.wbalance);
mUtilityPanel.setEffectName(ename);
mUtilityPanel.setShowParameter(false);
- ensureFilter("WBalance");
+ ensureFilter(ename);
break;
}
case R.id.hueButton: {
mCurrentImage = showImageView(R.id.imageShow).setShowControls(true);
String ename = mCurrentImage.getContext().getString(R.string.hue);
mUtilityPanel.setEffectName(ename);
- ensureFilter("Hue");
+ ensureFilter(ename);
break;
}
case R.id.exposureButton: {
mCurrentImage = showImageView(R.id.imageShow).setShowControls(true);
String ename = mCurrentImage.getContext().getString(R.string.exposure);
mUtilityPanel.setEffectName(ename);
- ensureFilter("Exposure");
+ ensureFilter(ename);
break;
}
case R.id.vibranceButton: {
mCurrentImage = showImageView(R.id.imageShow).setShowControls(true);
String ename = mCurrentImage.getContext().getString(R.string.vibrance);
mUtilityPanel.setEffectName(ename);
- ensureFilter("Vibrance");
+ ensureFilter(ename);
break;
}
case R.id.shadowRecoveryButton: {
mCurrentImage = showImageView(R.id.imageShow).setShowControls(true);
String ename = mCurrentImage.getContext().getString(R.string.shadow_recovery);
mUtilityPanel.setEffectName(ename);
- ensureFilter("Shadows");
+ ensureFilter(ename);
break;
}
case R.id.redEyeButton: {
mCurrentImage = showImageView(R.id.imageShow).setShowControls(true);
String ename = mCurrentImage.getContext().getString(R.string.redeye);
mUtilityPanel.setEffectName(ename);
- ensureFilter("Redeye");
+ ensureFilter(ename);
break;
}
case R.id.aspect: {
public class ImageFilterFx extends ImageFilter {
private static final String TAG = "ImageFilterFx";
Bitmap fxBitmap;
-
public ImageFilterFx(Bitmap fxBitmap,String name) {
setFilterType(TYPE_FX);
mName = name;
public void onDraw(Canvas canvas) {
getFilteredImage();
canvas.drawColor(mBackgroundColor);
- float textWidth = mPaint.measureText(getImagePreset().name());
+ float textWidth = mPaint.measureText(mImageFilter.getName());
int h = mTextSize + 2 * mTextPadding;
int x = (int) ((getWidth() - textWidth) / 2);
int y = getHeight();
drawImage(canvas, mFilteredImage, destination);
mPaint.setTextSize(mTextSize);
mPaint.setColor(mTextColor);
- canvas.drawText(getImagePreset().name(), x, y - mTextMargin, mPaint);
+ canvas.drawText(mImageFilter.getName(), x, y - mTextMargin, mPaint);
}
public void drawImage(Canvas canvas, Bitmap image, Rect destination) {
mText = a.getString(R.styleable.ImageButtonTitle_android_text);
}
+ public String getText(){
+ return mText;
+ }
+
@Override
public void onDraw(Canvas canvas) {
super.onDraw(canvas);