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 22 matching lines...) Expand all Loading... |
33 #include "core/fetch/ImageResource.h" | 33 #include "core/fetch/ImageResource.h" |
34 #include "core/platform/graphics/ImageBuffer.h" | 34 #include "core/platform/graphics/ImageBuffer.h" |
35 #include "core/rendering/shapes/PolygonShape.h" | 35 #include "core/rendering/shapes/PolygonShape.h" |
36 #include "core/rendering/shapes/RasterShape.h" | 36 #include "core/rendering/shapes/RasterShape.h" |
37 #include "core/rendering/shapes/RectangleShape.h" | 37 #include "core/rendering/shapes/RectangleShape.h" |
38 #include "platform/LengthFunctions.h" | 38 #include "platform/LengthFunctions.h" |
39 #include "platform/geometry/FloatSize.h" | 39 #include "platform/geometry/FloatSize.h" |
40 #include "platform/graphics/WindRule.h" | 40 #include "platform/graphics/WindRule.h" |
41 #include "wtf/MathExtras.h" | 41 #include "wtf/MathExtras.h" |
42 #include "wtf/OwnPtr.h" | 42 #include "wtf/OwnPtr.h" |
43 #include "wtf/PassOwnPtr.h" | |
44 | 43 |
45 namespace WebCore { | 44 namespace WebCore { |
46 | 45 |
47 static PassOwnPtr<Shape> createRectangleShape(const FloatRect& bounds, const Flo
atSize& radii) | 46 static PassOwnPtr<Shape> createRectangleShape(const FloatRect& bounds, const Flo
atSize& radii) |
48 { | 47 { |
49 ASSERT(bounds.width() >= 0 && bounds.height() >= 0 && radii.width() >= 0 &&
radii.height() >= 0); | 48 ASSERT(bounds.width() >= 0 && bounds.height() >= 0 && radii.width() >= 0 &&
radii.height() >= 0); |
50 return adoptPtr(new RectangleShape(bounds, radii)); | 49 return adoptPtr(new RectangleShape(bounds, radii)); |
51 } | 50 } |
52 | 51 |
53 static PassOwnPtr<Shape> createCircleShape(const FloatPoint& center, float radiu
s) | 52 static PassOwnPtr<Shape> createCircleShape(const FloatPoint& center, float radiu
s) |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 } | 240 } |
242 | 241 |
243 OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(intervals.release
(), imageSize)); | 242 OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(intervals.release
(), imageSize)); |
244 rasterShape->m_writingMode = writingMode; | 243 rasterShape->m_writingMode = writingMode; |
245 rasterShape->m_margin = floatValueForLength(margin, 0); | 244 rasterShape->m_margin = floatValueForLength(margin, 0); |
246 rasterShape->m_padding = floatValueForLength(padding, 0); | 245 rasterShape->m_padding = floatValueForLength(padding, 0); |
247 return rasterShape.release(); | 246 return rasterShape.release(); |
248 } | 247 } |
249 | 248 |
250 } // namespace WebCore | 249 } // namespace WebCore |
OLD | NEW |