Index: ui/gfx/image/image_skia_operations.h |
diff --git a/ui/gfx/image/image_skia_operations.h b/ui/gfx/image/image_skia_operations.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c7cc4fe536f08e7a724db74f29b5710daf4f05d4 |
--- /dev/null |
+++ b/ui/gfx/image/image_skia_operations.h |
@@ -0,0 +1,43 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_GFX_IMAGESKIA_OPERATIONS_H_ |
+#define UI_GFX_IMAGESKIA_OPERATIONS_H_ |
+#pragma once |
+ |
+#include "base/gtest_prod_util.h" |
+#include "ui/base/ui_export.h" |
+ |
+namespace gfx { |
+class ImageSkia; |
+ |
+class UI_EXPORT ImageSkiaOperations { |
+ public: |
+ // Create an image that is a blend of two others. The alpha argument |
+ // specifies the opacity of the second imag. The provided image must |
+ // use have the kARGB_8888_Config config and be of equal dimensions. |
pkotwicz
2012/07/10 17:16:48
Nit: Get rid of 'have'
|
+ static ImageSkia CreateBlendedImage(const ImageSkia& first, |
+ const ImageSkia& second, |
+ double alpha); |
+ |
+ // Create an image that is the original bitmap masked out by the mask defined |
+ // in the alpha bitmap. The images must use the kARGB_8888_Config config and |
+ // be of equal dimensions. |
+ static ImageSkia CreateMaskedImage(const ImageSkia& first, |
+ const ImageSkia& alpha); |
+ |
+ // Create a bitmap that is cropped from another bitmap. This is special |
pkotwicz
2012/07/10 17:16:48
Nit: bitmap->image
|
+ // because it tiles the original bitmap, so your coordinates can extend |
+ // outside the bounds of the original image. |
+ static ImageSkia CreateTiledImage(const ImageSkia& bitmap, |
+ int src_x, int src_y, |
+ int dst_w, int dst_h); |
+ |
+ private: |
+ ImageSkiaOperations(); // Class for scoping only. |
+}; |
+ |
+} |
+ |
+#endif // UI_GFX_IMAGESKIA_OPERATIONS_H_ |