Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,24 @@ private void resetImageInfo() {
mAngle = mExifRotation;
}

/**
* Flip Image.
* @param flipMode type of flip operation.
*/
public void flipImage(FlipMode flipMode) {
switch (flipMode) {
case HORIZONTAL:
mMatrix.postScale(-1, 1);
break;
case VERTICAL:
mMatrix.postScale(1, -1);
break;
default:
throw new IllegalStateException("Unexpected value: " + flipMode);
}
updateLayout();
}

/**
* Load image from Uri.
* This method is deprecated. Use loadAsync(Uri, LoadCallback) instead.
Expand Down Expand Up @@ -2356,6 +2374,10 @@ public int getId() {
}
}

public enum FlipMode {
HORIZONTAL, VERTICAL
}

public enum ShowMode {
SHOW_ALWAYS(1), SHOW_ON_TOUCH(2), NOT_SHOW(3);
private final int ID;
Expand Down