| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.content.browser; | 5 package org.chromium.content.browser; |
| 6 | 6 |
| 7 import android.annotation.SuppressLint; |
| 7 import android.content.Context; | 8 import android.content.Context; |
| 8 import android.content.res.Resources; | 9 import android.content.res.Resources; |
| 9 import android.graphics.Bitmap; | 10 import android.graphics.Bitmap; |
| 10 import android.graphics.Canvas; | 11 import android.graphics.Canvas; |
| 11 import android.graphics.Color; | 12 import android.graphics.Color; |
| 12 import android.graphics.Paint; | 13 import android.graphics.Paint; |
| 13 import android.graphics.Path; | 14 import android.graphics.Path; |
| 14 import android.graphics.Path.Direction; | 15 import android.graphics.Path.Direction; |
| 15 import android.graphics.PointF; | 16 import android.graphics.PointF; |
| 16 import android.graphics.PorterDuff.Mode; | 17 import android.graphics.PorterDuff.Mode; |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 return new PointF(x, y); | 532 return new PointF(x, y); |
| 532 } | 533 } |
| 533 | 534 |
| 534 /** | 535 /** |
| 535 * Returns true if the point is inside the final drawable area for this popu
p zoomer. | 536 * Returns true if the point is inside the final drawable area for this popu
p zoomer. |
| 536 */ | 537 */ |
| 537 private boolean isTouchOutsideArea(float x, float y) { | 538 private boolean isTouchOutsideArea(float x, float y) { |
| 538 return !mClipRect.contains(x, y); | 539 return !mClipRect.contains(x, y); |
| 539 } | 540 } |
| 540 | 541 |
| 542 @SuppressLint("ClickableViewAccessibility") |
| 541 @Override | 543 @Override |
| 542 public boolean onTouchEvent(MotionEvent event) { | 544 public boolean onTouchEvent(MotionEvent event) { |
| 543 mGestureDetector.onTouchEvent(event); | 545 mGestureDetector.onTouchEvent(event); |
| 544 return true; | 546 return true; |
| 545 } | 547 } |
| 546 | 548 |
| 547 private static class ReverseInterpolator implements Interpolator { | 549 private static class ReverseInterpolator implements Interpolator { |
| 548 private final Interpolator mInterpolator; | 550 private final Interpolator mInterpolator; |
| 549 | 551 |
| 550 public ReverseInterpolator(Interpolator i) { | 552 public ReverseInterpolator(Interpolator i) { |
| 551 mInterpolator = i; | 553 mInterpolator = i; |
| 552 } | 554 } |
| 553 | 555 |
| 554 @Override | 556 @Override |
| 555 public float getInterpolation(float input) { | 557 public float getInterpolation(float input) { |
| 556 input = 1.0f - input; | 558 input = 1.0f - input; |
| 557 if (mInterpolator == null) return input; | 559 if (mInterpolator == null) return input; |
| 558 return mInterpolator.getInterpolation(input); | 560 return mInterpolator.getInterpolation(input); |
| 559 } | 561 } |
| 560 } | 562 } |
| 561 } | 563 } |
| OLD | NEW |