| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef UI_GFX_IMAGE_SKIA_OPERATIONS_H_ | 5 #ifndef UI_GFX_IMAGE_SKIA_OPERATIONS_H_ |
| 6 #define UI_GFX_IMAGE_SKIA_OPERATIONS_H_ | 6 #define UI_GFX_IMAGE_SKIA_OPERATIONS_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "skia/ext/image_operations.h" | 9 #include "skia/ext/image_operations.h" |
| 10 #include "ui/gfx/color_utils.h" | 10 #include "ui/gfx/color_utils.h" |
| 11 #include "ui/gfx/gfx_export.h" | 11 #include "ui/gfx/gfx_export.h" |
| 12 #include "ui/gfx/shadow_value.h" | 12 #include "ui/gfx/shadow_value.h" |
| 13 #include "ui/gfx/skbitmap_operations.h" | 13 #include "ui/gfx/skbitmap_operations.h" |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 class ImageSkia; | 16 class ImageSkia; |
| 17 class Rect; | 17 class Rect; |
| 18 class Size; | 18 class Size; |
| 19 | 19 |
| 20 class UI_EXPORT ImageSkiaOperations { | 20 class GFX_EXPORT ImageSkiaOperations { |
| 21 public: | 21 public: |
| 22 // Create an image that is a blend of two others. The alpha argument | 22 // Create an image that is a blend of two others. The alpha argument |
| 23 // specifies the opacity of the second imag. The provided image must | 23 // specifies the opacity of the second imag. The provided image must |
| 24 // use the kARGB_8888_Config config and be of equal dimensions. | 24 // use the kARGB_8888_Config config and be of equal dimensions. |
| 25 static ImageSkia CreateBlendedImage(const ImageSkia& first, | 25 static ImageSkia CreateBlendedImage(const ImageSkia& first, |
| 26 const ImageSkia& second, | 26 const ImageSkia& second, |
| 27 double alpha); | 27 double alpha); |
| 28 | 28 |
| 29 // Creates an image that is the original image with opacity set to |alpha|. | 29 // Creates an image that is the original image with opacity set to |alpha|. |
| 30 static ImageSkia CreateTransparentImage(const ImageSkia& image, double alpha); | 30 static ImageSkia CreateTransparentImage(const ImageSkia& image, double alpha); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 const ImageSkia& source, | 94 const ImageSkia& source, |
| 95 SkBitmapOperations::RotationAmount rotation); | 95 SkBitmapOperations::RotationAmount rotation); |
| 96 | 96 |
| 97 private: | 97 private: |
| 98 ImageSkiaOperations(); // Class for scoping only. | 98 ImageSkiaOperations(); // Class for scoping only. |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace gfx | 101 } // namespace gfx |
| 102 | 102 |
| 103 #endif // UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ | 103 #endif // UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ |
| OLD | NEW |