OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_VIEWS_ANIMATION_FLOOD_FILL_INK_DROP_RIPPLE_H_ | 5 #ifndef UI_VIEWS_ANIMATION_FLOOD_FILL_INK_DROP_RIPPLE_H_ |
6 #define UI_VIEWS_ANIMATION_FLOOD_FILL_INK_DROP_RIPPLE_H_ | 6 #define UI_VIEWS_ANIMATION_FLOOD_FILL_INK_DROP_RIPPLE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 gfx::Tween::Type tween, | 94 gfx::Tween::Type tween, |
95 ui::LayerAnimationObserver* observer); | 95 ui::LayerAnimationObserver* observer); |
96 | 96 |
97 // Returns the Transform to be applied to the |painted_layer_| for the given | 97 // Returns the Transform to be applied to the |painted_layer_| for the given |
98 // |target_radius|. | 98 // |target_radius|. |
99 gfx::Transform CalculateTransform(float target_radius) const; | 99 gfx::Transform CalculateTransform(float target_radius) const; |
100 | 100 |
101 // Returns the target Transform for when the ink drop is fully shown. | 101 // Returns the target Transform for when the ink drop is fully shown. |
102 gfx::Transform GetMaxSizeTargetTransform() const; | 102 gfx::Transform GetMaxSizeTargetTransform() const; |
103 | 103 |
| 104 // Returns the largest distance from |point| to the corners of the |
| 105 // |root_layer_| bounds. |
| 106 float MaxDistanceToCorners(const gfx::Point& point) const; |
| 107 |
104 // The point where the Center of the ink drop's circle should be drawn. | 108 // The point where the Center of the ink drop's circle should be drawn. |
105 gfx::Point center_point_; | 109 gfx::Point center_point_; |
106 | 110 |
107 // The root layer that parents the animating layer. The root layer is used to | 111 // The root layer that parents the animating layer. The root layer is used to |
108 // manipulate opacity and clipping bounds, and it child is used to manipulate | 112 // manipulate opacity and clipping bounds, and it child is used to manipulate |
109 // the different shape of the ink drop. | 113 // the different shape of the ink drop. |
110 ui::Layer root_layer_; | 114 ui::Layer root_layer_; |
111 | 115 |
112 // ui::LayerDelegate to paint the |painted_layer_|. | 116 // ui::LayerDelegate to paint the |painted_layer_|. |
113 CircleLayerDelegate circle_layer_delegate_; | 117 CircleLayerDelegate circle_layer_delegate_; |
114 | 118 |
115 // Child ui::Layer of |root_layer_|. Used to manipulate the different size | 119 // Child ui::Layer of |root_layer_|. Used to manipulate the different size |
116 // and shape of the ink drop. | 120 // and shape of the ink drop. |
117 ui::Layer painted_layer_; | 121 ui::Layer painted_layer_; |
118 | 122 |
119 // The current ink drop state. | 123 // The current ink drop state. |
120 InkDropState ink_drop_state_; | 124 InkDropState ink_drop_state_; |
121 | 125 |
122 DISALLOW_COPY_AND_ASSIGN(FloodFillInkDropRipple); | 126 DISALLOW_COPY_AND_ASSIGN(FloodFillInkDropRipple); |
123 }; | 127 }; |
124 | 128 |
125 } // namespace views | 129 } // namespace views |
126 | 130 |
127 #endif // UI_VIEWS_ANIMATION_FLOOD_FILL_INK_DROP_RIPPLE_H_ | 131 #endif // UI_VIEWS_ANIMATION_FLOOD_FILL_INK_DROP_RIPPLE_H_ |
OLD | NEW |