package com.android.gallery3d.filtershow;
-import android.annotation.TargetApi;
import android.content.Context;
import android.text.Html;
import android.view.View;
import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.editors.Editor;
+import com.android.gallery3d.filtershow.editors.EditorTinyPlanet;
import com.android.gallery3d.filtershow.filters.FilterRepresentation;
import com.android.gallery3d.filtershow.filters.ImageFilter;
import com.android.gallery3d.filtershow.filters.ImageFilterTinyPlanet;
-import com.android.gallery3d.filtershow.imageshow.ImageCrop;
-import com.android.gallery3d.filtershow.imageshow.ImageGeometry;
import com.android.gallery3d.filtershow.imageshow.ImageShow;
import com.android.gallery3d.filtershow.imageshow.MasterImage;
import com.android.gallery3d.filtershow.presets.ImagePreset;
return;
}
- switch (view.getId()) {
- case R.id.tinyplanetButton: {
- mCurrentImage = showImageView(R.id.imageTinyPlanet);
- String ename = mCurrentImage.getContext().getString(R.string.tinyplanet);
- mUtilityPanel.setEffectName(ename);
- break;
- }
- case R.id.applyEffect: {
+ int id = view.getId();
+ if (id == EditorTinyPlanet.ID) {
+ mCurrentImage = showImageView(R.id.imageTinyPlanet);
+ String ename = mCurrentImage.getContext().getString(R.string.tinyplanet);
+ mUtilityPanel.setEffectName(ename);
+
+ } else {
+ if (id == R.id.applyEffect) {
if (MasterImage.getImage().getCurrentFilter() instanceof ImageFilterTinyPlanet) {
mActivity.saveImage();
} else {
showPanel(mCurrentPanel);
}
MasterImage.getImage().invalidateFiltersOnly();
- break;
+
}
}
mCurrentImage.select();
private float mDownRadiusY;
private Matrix mScrToImg;
- private final static int HAN_CENTER = 0;
- private final static int HAN_NORTH = 7;
- private final static int HAN_NE = 8;
- private final static int HAN_EAST = 1;
- private final static int HAN_SE = 2;
- private final static int HAN_SOUTH = 3;
- private final static int HAN_SW = 4;
- private final static int HAN_WEST = 5;
- private final static int HAN_NW = 6;
+ public final static int HAN_CENTER = 0;
+ public final static int HAN_NORTH = 7;
+ public final static int HAN_NE = 8;
+ public final static int HAN_EAST = 1;
+ public final static int HAN_SE = 2;
+ public final static int HAN_SOUTH = 3;
+ public final static int HAN_SW = 4;
+ public final static int HAN_WEST = 5;
+ public final static int HAN_NW = 6;
public EclipseControl(Context context) {
mSliderColor = context.getResources().getColor(R.color.slider_line_color);