Skip to content

Commit

Permalink
Merge pull request davemorrissey#129 from ulyssesp/master
Browse files Browse the repository at this point in the history
Use getRequiredRotation() for non-tiled images
  • Loading branch information
davemorrissey committed Oct 13, 2015
2 parents 7f1a51c + c159beb commit 0e3b145
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -975,14 +975,14 @@ protected void onDraw(Canvas canvas) {
if (matrix == null) { matrix = new Matrix(); }
matrix.reset();
matrix.postScale(xScale, yScale);
matrix.postRotate(getOrientation());
matrix.postRotate(getRequiredRotation());
matrix.postTranslate(vTranslate.x, vTranslate.y);

if (getOrientation() == ORIENTATION_180) {
if (getRequiredRotation() == ORIENTATION_180) {
matrix.postTranslate(scale * sWidth, scale * sHeight);
} else if (getOrientation() == ORIENTATION_90) {
} else if (getRequiredRotation() == ORIENTATION_90) {
matrix.postTranslate(scale * sHeight, 0);
} else if (getOrientation() == ORIENTATION_270) {
} else if (getRequiredRotation() == ORIENTATION_270) {
matrix.postTranslate(0, scale * sWidth);
}

Expand Down

0 comments on commit 0e3b145

Please sign in to comment.