Changeset 28944 in webkit
- Timestamp:
- Dec 21, 2007 5:01:24 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r28934 r28944 1 2007-12-21 Brent Fulgham <bfulgham@gmail.com> 2 3 Reviewed by Alp Toker. 4 5 http://bugs.webkit.org/show_bug.cgi?id=16558 6 Cairo WebCore Rendering Fails on arc drawing 7 8 Fix for bug reported (and patched) by Apollo team in which 9 arcs were draw in reverse (resulting in inverted images). 10 Review of the source found that the 'clockwise' term was 11 actually meant to mean 'anticlockwise' so the IDL and 12 supporting classes have been changed to match this. 13 14 * html/CanvasRenderingContext2D.cpp: 15 (WebCore::CanvasRenderingContext2D::arc): 16 * html/CanvasRenderingContext2D.idl: 17 * platform/graphics/cairo/PathCairo.cpp: 18 (WebCore::Path::addArc): 19 (WebCore::Path::addEllipse): 20 * platform/graphics/Path.h: 21 1 22 2007-12-21 Alexey Proskuryakov <ap@webkit.org> 2 23 -
trunk/WebCore/html/CanvasRenderingContext2D.cpp
r28382 r28944 420 420 } 421 421 422 void CanvasRenderingContext2D::arc(float x, float y, float r, float sa, float ea, bool clockwise, ExceptionCode& ec)422 void CanvasRenderingContext2D::arc(float x, float y, float r, float sa, float ea, bool anticlockwise, ExceptionCode& ec) 423 423 { 424 424 ec = 0; … … 427 427 return; 428 428 } 429 state().m_path.addArc(FloatPoint(x, y), r, sa, ea, clockwise);429 state().m_path.addArc(FloatPoint(x, y), r, sa, ea, anticlockwise); 430 430 } 431 431 -
trunk/WebCore/html/CanvasRenderingContext2D.idl
r27276 r28944 73 73 void rect(in float x, in float y, in float width, in float height) 74 74 raises (DOMException); 75 void arc(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean clockwise)75 void arc(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean anticlockwise) 76 76 raises (DOMException); 77 77 void fill(); -
trunk/WebCore/platform/graphics/Path.h
r27190 r28944 98 98 void closeSubpath(); 99 99 100 void addArc(const FloatPoint&, float radius, float startAngle, float endAngle, bool clockwise);100 void addArc(const FloatPoint&, float radius, float startAngle, float endAngle, bool anticlockwise); 101 101 void addRect(const FloatRect&); 102 102 void addEllipse(const FloatRect&); -
trunk/WebCore/platform/graphics/cairo/PathCairo.cpp
r28860 r28944 33 33 #include <cairo.h> 34 34 #include <math.h> 35 #include <wtf/MathExtras.h> 35 36 36 37 namespace WebCore { … … 137 138 } 138 139 139 void Path::addArc(const FloatPoint& p, float r, float sa, float ea, bool clockwise)140 void Path::addArc(const FloatPoint& p, float r, float sa, float ea, bool anticlockwise) 140 141 { 141 142 // http://bugs.webkit.org/show_bug.cgi?id=16449 … … 145 146 146 147 cairo_t* cr = platformPath()->m_cr; 147 if (clockwise) 148 if (anticlockwise) 149 cairo_arc_negative(cr, p.x(), p.y(), r, sa, ea); 150 else 148 151 cairo_arc(cr, p.x(), p.y(), r, sa, ea); 149 else150 cairo_arc_negative(cr, p.x(), p.y(), r, sa, ea);151 152 } 152 153 … … 166 167 cairo_translate(cr, rect.x() + xRadius, rect.y() + yRadius); 167 168 cairo_scale(cr, xRadius, yRadius); 168 cairo_arc(cr, 0., 0., 1., 0., 2 * M_PI);169 cairo_arc(cr, 0., 0., 1., 0., 2 * piDouble); 169 170 cairo_restore(cr); 170 171 }
Note: See TracChangeset
for help on using the changeset viewer.