Modified: trunk/Source/WebCore/ChangeLog (180880 => 180881)
--- trunk/Source/WebCore/ChangeLog 2015-03-02 03:58:30 UTC (rev 180880)
+++ trunk/Source/WebCore/ChangeLog 2015-03-02 04:33:06 UTC (rev 180881)
@@ -1,3 +1,15 @@
+2015-03-01 Hunseop Jeong <hs85.je...@samsung.com>
+
+ [Cairo] Implement Path::addEllipse
+ https://bugs.webkit.org/show_bug.cgi?id=142144
+
+ Reviewed by Gyuyoung Kim.
+
+ Add support for addEllipse method for platforms using cairo.
+
+ * platform/graphics/cairo/PathCairo.cpp:
+ (WebCore::Path::addEllipse):
+
2015-03-01 Joonghun Park <jh718.p...@samsung.com>
Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ScrollAnimator
Modified: trunk/Source/WebCore/platform/graphics/cairo/PathCairo.cpp (180880 => 180881)
--- trunk/Source/WebCore/platform/graphics/cairo/PathCairo.cpp 2015-03-02 03:58:30 UTC (rev 180880)
+++ trunk/Source/WebCore/platform/graphics/cairo/PathCairo.cpp 2015-03-02 04:33:06 UTC (rev 180881)
@@ -284,9 +284,20 @@
addArc(p, radius, sa, ea, anticlockwise);
}
-void Path::addEllipse(FloatPoint, float, float, float, float, float, bool)
+void Path::addEllipse(FloatPoint point, float radiusX, float radiusY, float rotation, float startAngle, float endAngle, bool anticlockwise)
{
- notImplemented();
+ cairo_t* cr = ensurePlatformPath()->context();
+ cairo_save(cr);
+ cairo_translate(cr, point.x(), point.y());
+ cairo_rotate(cr, rotation);
+ cairo_scale(cr, radiusX, radiusY);
+
+ if (anticlockwise)
+ cairo_arc_negative(cr, 0, 0, 1, startAngle, endAngle);
+ else
+ cairo_arc(cr, 0, 0, 1, startAngle, endAngle);
+
+ cairo_restore(cr);
}
void Path::addEllipse(const FloatRect& rect)