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..2aff6de66af9744dbf0f3f3f56fab26f67637442 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; |
} |
+class SkPath; |
+ |
namespace views { |
class Painter; |
@@ -204,6 +207,12 @@ class VIEWS_EXPORT BubbleBorder : public Border { |
// Gets the arrow offset to use. |
int GetArrowOffset(const gfx::Size& border_size) const; |
+ // Returns the arrow mask/path given |view_bounds|. |view_bounds| should be in |
+ // it's own coordinates(i.e. with origin at (0,0)). An empty mask is returned |
tapted
2016/01/28 05:59:22
nit: it's -> its, `coordinates(i.e. with origin at
karandeepb
2016/02/04 03:39:27
Done.
|
+ // in case the border doesn't have an arrow or the arrow paint type is not |
+ // PAINT_NORMAL. |
+ void GetArrowMask(const gfx::Rect& view_bounds, gfx::Path* mask) const; |
tapted
2016/01/28 05:59:22
I think GetArrowPath is a better name for it, sinc
karandeepb
2016/02/04 03:39:28
Done.
|
+ |
// Overridden from Border: |
void Paint(const View& view, gfx::Canvas* canvas) override; |
gfx::Insets GetInsets() const override; |
@@ -220,6 +229,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 GetArrowMaskFromArrowBounds(const gfx::Rect& arrow_bounds, |
tapted
2016/01/28 05:59:22
Mask/mask -> Path/path
karandeepb
2016/02/04 03:39:27
Done.
|
+ SkPath* mask) const; |
void DrawArrow(gfx::Canvas* canvas, const gfx::Rect& arrow_bounds) const; |
internal::BorderImages* GetImagesForTest() const; |