OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_GFX_SHADOW_UTIL_H_ |
| 6 #define UI_GFX_SHADOW_UTIL_H_ |
| 7 |
| 8 #include "ui/gfx/gfx_export.h" |
| 9 #include "ui/gfx/image/image_skia.h" |
| 10 #include "ui/gfx/shadow_value.h" |
| 11 |
| 12 namespace gfx { |
| 13 |
| 14 // A struct that describes a vector of shadows and their depiction as an image |
| 15 // suitable for ninebox tiling. |
| 16 struct GFX_EXPORT ShadowDetails { |
| 17 ShadowDetails(); |
| 18 ShadowDetails(const ShadowDetails& other); |
| 19 ~ShadowDetails(); |
| 20 |
| 21 // Returns a cached ShadowDetails for the given elevation (which controls |
| 22 // style) and corner radius. Creates the ShadowDetails first if necessary. |
| 23 static const ShadowDetails& Get(int elevation, int radius); |
| 24 |
| 25 // Description of the shadows. |
| 26 gfx::ShadowValues values; |
| 27 // Cached ninebox image based on |values|. |
| 28 gfx::ImageSkia ninebox_image; |
| 29 }; |
| 30 |
| 31 } // namespace gfx |
| 32 |
| 33 #endif // UI_GFX_SHADOW_UTIL_H_ |
OLD | NEW |