Chromium Code Reviews| Index: ui/views/bubble/bubble_border.h |
| diff --git a/ui/views/bubble/bubble_border.h b/ui/views/bubble/bubble_border.h |
| index fac3a719a474b9771fda692b4fad20bfb99a868c..bb8a533f9b4812f08cee6122bad2572238b81185 100644 |
| --- a/ui/views/bubble/bubble_border.h |
| +++ b/ui/views/bubble/bubble_border.h |
| @@ -15,8 +15,11 @@ |
| namespace gfx { |
| class Rect; |
| +class Path; |
|
tapted
2016/02/05 04:51:07
nit: alphabetise
karandeepb
2016/02/08 07:47:09
Done. Didn't knew this was a word!
|
| } |
| +class SkPath; |
| + |
| namespace views { |
| class Painter; |
| @@ -204,6 +207,13 @@ class VIEWS_EXPORT BubbleBorder : public Border { |
| // Gets the arrow offset to use. |
| int GetArrowOffset(const gfx::Size& border_size) const; |
| + // Retreives the arrow path given |view_bounds|. |view_bounds| should be in |
| + // its own coordinates (origin at (0,0)). |
| + // Returns false if |path| is unchanged, which is the case when there is no |
| + // painted arrow. |
| + // The returned path does not account for arrow stroke and shadow. |
| + bool GetArrowPath(const gfx::Rect& view_bounds, gfx::Path* path) const; |
| + |
| // Overridden from Border: |
| void Paint(const View& view, gfx::Canvas* canvas) override; |
| gfx::Insets GetInsets() const override; |
| @@ -220,6 +230,8 @@ class VIEWS_EXPORT BubbleBorder : public Border { |
| gfx::Size GetSizeForContentsSize(const gfx::Size& contents_size) const; |
| gfx::ImageSkia* GetArrowImage() const; |
| gfx::Rect GetArrowRect(const gfx::Rect& bounds) const; |
| + void GetArrowPathFromArrowBounds(const gfx::Rect& arrow_bounds, |
| + SkPath* mask) const; |
|
tapted
2016/02/05 04:51:07
nit: mask -> path
karandeepb
2016/02/08 07:47:09
Done.
|
| void DrawArrow(gfx::Canvas* canvas, const gfx::Rect& arrow_bounds) const; |
| internal::BorderImages* GetImagesForTest() const; |