OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 void move(const FloatSize& size) { m_rect.move(size); } | 109 void move(const FloatSize& size) { m_rect.move(size); } |
110 void inflateWithRadii(int size); | 110 void inflateWithRadii(int size); |
111 void inflate(float size) { m_rect.inflate(size); } | 111 void inflate(float size) { m_rect.inflate(size); } |
112 | 112 |
113 // expandRadii() does not have any effect on corner radii which have zero wi
dth or height. This is because the process of expanding | 113 // expandRadii() does not have any effect on corner radii which have zero wi
dth or height. This is because the process of expanding |
114 // the radius of a corner is not allowed to make sharp corners non-sharp. Th
is applies when "spreading" a shadow or | 114 // the radius of a corner is not allowed to make sharp corners non-sharp. Th
is applies when "spreading" a shadow or |
115 // a box shape. | 115 // a box shape. |
116 void expandRadii(float size) { m_radii.expand(size); } | 116 void expandRadii(float size) { m_radii.expand(size); } |
117 void shrinkRadii(float size) { m_radii.shrink(size); } | 117 void shrinkRadii(float size) { m_radii.shrink(size); } |
118 | 118 |
| 119 void shrink(const FloatRectOutsets&); |
| 120 |
119 // Returns a quickly computed rect enclosed by the rounded rect. | 121 // Returns a quickly computed rect enclosed by the rounded rect. |
120 FloatRect radiusCenterRect() const; | 122 FloatRect radiusCenterRect() const; |
121 | 123 |
122 FloatRect topLeftCorner() const | 124 FloatRect topLeftCorner() const |
123 { | 125 { |
124 return FloatRect(m_rect.x(), m_rect.y(), m_radii.topLeft().width(), m_ra
dii.topLeft().height()); | 126 return FloatRect(m_rect.x(), m_rect.y(), m_radii.topLeft().width(), m_ra
dii.topLeft().height()); |
125 } | 127 } |
126 FloatRect topRightCorner() const | 128 FloatRect topRightCorner() const |
127 { | 129 { |
128 return FloatRect(m_rect.maxX() - m_radii.topRight().width(), m_rect.y(),
m_radii.topRight().width(), m_radii.topRight().height()); | 130 return FloatRect(m_rect.maxX() - m_radii.topRight().width(), m_rect.y(),
m_radii.topRight().width(), m_radii.topRight().height()); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 200 |
199 | 201 |
200 inline bool operator==(const FloatRoundedRect& a, const FloatRoundedRect& b) | 202 inline bool operator==(const FloatRoundedRect& a, const FloatRoundedRect& b) |
201 { | 203 { |
202 return a.rect() == b.rect() && a.radii() == b.radii(); | 204 return a.rect() == b.rect() && a.radii() == b.radii(); |
203 } | 205 } |
204 | 206 |
205 } // namespace blink | 207 } // namespace blink |
206 | 208 |
207 #endif // FloatRoundedRect_h | 209 #endif // FloatRoundedRect_h |
OLD | NEW |