OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 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 11 matching lines...) Expand all Loading... |
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF | 25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
26 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 26 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
27 * SUCH DAMAGE. | 27 * SUCH DAMAGE. |
28 */ | 28 */ |
29 | 29 |
30 #include "config.h" | 30 #include "config.h" |
31 | 31 |
32 #include "core/platform/graphics/Path.h" | |
33 #include "core/rendering/style/BasicShapes.h" | 32 #include "core/rendering/style/BasicShapes.h" |
34 #include "platform/LengthFunctions.h" | 33 #include "platform/LengthFunctions.h" |
35 #include "platform/geometry/FloatRect.h" | 34 #include "platform/geometry/FloatRect.h" |
| 35 #include "platform/graphics/Path.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 bool BasicShape::canBlend(const BasicShape* other) const | 39 bool BasicShape::canBlend(const BasicShape* other) const |
40 { | 40 { |
41 // FIXME: Support animations between different shapes in the future. | 41 // FIXME: Support animations between different shapes in the future. |
42 if (type() != other->type()) | 42 if (type() != other->type()) |
43 return false; | 43 return false; |
44 | 44 |
45 // Just polygons with same number of vertices can be animated. | 45 // Just polygons with same number of vertices can be animated. |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 RefPtr<BasicShapeInsetRectangle> result = BasicShapeInsetRectangle::create(
); | 205 RefPtr<BasicShapeInsetRectangle> result = BasicShapeInsetRectangle::create(
); |
206 result->setTop(m_top.blend(o->top(), progress, ValueRangeNonNegative)); | 206 result->setTop(m_top.blend(o->top(), progress, ValueRangeNonNegative)); |
207 result->setRight(m_right.blend(o->right(), progress, ValueRangeNonNegative))
; | 207 result->setRight(m_right.blend(o->right(), progress, ValueRangeNonNegative))
; |
208 result->setBottom(m_bottom.blend(o->bottom(), progress, ValueRangeNonNegativ
e)); | 208 result->setBottom(m_bottom.blend(o->bottom(), progress, ValueRangeNonNegativ
e)); |
209 result->setLeft(m_left.blend(o->left(), progress, ValueRangeNonNegative)); | 209 result->setLeft(m_left.blend(o->left(), progress, ValueRangeNonNegative)); |
210 result->setCornerRadiusX(m_cornerRadiusX.blend(o->cornerRadiusX(), progress,
ValueRangeNonNegative)); | 210 result->setCornerRadiusX(m_cornerRadiusX.blend(o->cornerRadiusX(), progress,
ValueRangeNonNegative)); |
211 result->setCornerRadiusY(m_cornerRadiusY.blend(o->cornerRadiusY(), progress,
ValueRangeNonNegative)); | 211 result->setCornerRadiusY(m_cornerRadiusY.blend(o->cornerRadiusY(), progress,
ValueRangeNonNegative)); |
212 return result.release(); | 212 return result.release(); |
213 } | 213 } |
214 } | 214 } |
OLD | NEW |