Chromium Code Reviews| Index: Source/core/platform/graphics/RoundedRect.cpp |
| diff --git a/Source/core/platform/graphics/RoundedRect.cpp b/Source/core/platform/graphics/RoundedRect.cpp |
| index 124af84a62ef7880bd0681673d5d9d0f186eea01..804eb0ad0d081c893da64baa1c490400b43ada53 100644 |
| --- a/Source/core/platform/graphics/RoundedRect.cpp |
| +++ b/Source/core/platform/graphics/RoundedRect.cpp |
| @@ -80,6 +80,15 @@ void RoundedRect::Radii::expand(int topWidth, int bottomWidth, int leftWidth, in |
| } |
| } |
| +IntRect RoundedRect::enclosedRect() const |
|
Julien - ping for review
2013/06/19 19:42:58
This will return a smaller rectangle that what enc
jbroman
2013/08/02 14:28:17
What I want is "quickly give me a rect which is en
|
| +{ |
| + int minX = m_rect.x() + max(m_radii.topLeft().width(), m_radii.bottomLeft().width()); |
| + int minY = m_rect.y() + max(m_radii.topLeft().height(), m_radii.topRight().height()); |
| + int maxX = m_rect.maxX() - max(m_radii.topRight().width(), m_radii.bottomRight().width()); |
| + int maxY = m_rect.maxY() - max(m_radii.bottomLeft().height(), m_radii.bottomRight().height()); |
| + return IntRect(minX, minY, maxX - minX, maxY - minY); |
| +} |
| + |
| void RoundedRect::inflateWithRadii(int size) |
| { |
| IntRect old = m_rect; |