| 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_IMAGE_UTIL_H_ | 5 #ifndef UI_GFX_IMAGE_IMAGE_UTIL_H_ |
| 6 #define UI_GFX_IMAGE_IMAGE_UTIL_H_ | 6 #define UI_GFX_IMAGE_IMAGE_UTIL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <vector> | 10 #include <vector> |
| 9 | 11 |
| 10 #include "base/basictypes.h" | |
| 11 #include "ui/gfx/gfx_export.h" | 12 #include "ui/gfx/gfx_export.h" |
| 12 | 13 |
| 13 namespace gfx { | 14 namespace gfx { |
| 14 class Image; | 15 class Image; |
| 15 class ImageSkia; | 16 class ImageSkia; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace gfx { | 19 namespace gfx { |
| 19 | 20 |
| 20 // Creates an image from the given JPEG-encoded input. If there was an error | 21 // Creates an image from the given JPEG-encoded input. If there was an error |
| (...skipping 23 matching lines...) Expand all Loading... |
| 44 // This method is only suitable for fairly small images (i.e. 16x16). | 45 // This method is only suitable for fairly small images (i.e. 16x16). |
| 45 // The margins for a completely transparent image will be w/2-1, w/2, but this | 46 // The margins for a completely transparent image will be w/2-1, w/2, but this |
| 46 // will be an expensive operation: it isn't expected that it will be frequently | 47 // will be an expensive operation: it isn't expected that it will be frequently |
| 47 // calculated. | 48 // calculated. |
| 48 GFX_EXPORT bool VisibleMargins(const ImageSkia& image, | 49 GFX_EXPORT bool VisibleMargins(const ImageSkia& image, |
| 49 int* leading, int* trailing); | 50 int* leading, int* trailing); |
| 50 | 51 |
| 51 } // namespace gfx | 52 } // namespace gfx |
| 52 | 53 |
| 53 #endif // UI_GFX_IMAGE_IMAGE_UTIL_H_ | 54 #endif // UI_GFX_IMAGE_IMAGE_UTIL_H_ |
| OLD | NEW |