Changeset 39008 in webkit
- Timestamp:
- Dec 4, 2008 4:03:08 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r39007 r39008 1 2008-12-04 Kevin Watters <kevinwatters@gmail.com> 2 3 Reviewed by Kevin Ollivier. 4 5 wx implementations for Path API. 6 7 https://bugs.webkit.org/show_bug.cgi?id=22661 8 9 * platform/graphics/wx/PathWx.cpp: 10 (WebCore::Path::~Path): 11 (WebCore::Path::contains): 12 (WebCore::Path::addLineTo): 13 (WebCore::Path::addQuadCurveTo): 14 (WebCore::Path::addBezierCurveTo): 15 (WebCore::Path::addArcTo): 16 (WebCore::Path::closeSubpath): 17 (WebCore::Path::addArc): 18 (WebCore::Path::addRect): 19 (WebCore::Path::addEllipse): 20 (WebCore::Path::transform): 21 (WebCore::Path::isEmpty): 22 1 23 2008-12-04 Julien Chaffraix <jchaffraix@webkit.org> 2 24 -
trunk/WebCore/platform/graphics/wx/PathWx.cpp
r30363 r39008 65 65 66 66 Path::~Path() 67 { 67 { 68 68 } 69 69 … … 75 75 bool Path::contains(const FloatPoint& point, const WindRule rule) const 76 76 { 77 if (m_path) { 78 return m_path->Contains(point.x(), point.y(), getWxWindRuleForWindRule(rule)); 79 } 77 80 return false; 78 81 } … … 122 125 } 123 126 124 void Path::addLineTo(const FloatPoint& )127 void Path::addLineTo(const FloatPoint& point) 125 128 { 126 notImplemented(); 129 if (m_path) 130 m_path->AddLineToPoint(point.x(), point.y()); 127 131 } 128 132 129 void Path::addQuadCurveTo(const FloatPoint& , const FloatPoint&)133 void Path::addQuadCurveTo(const FloatPoint& control, const FloatPoint& end) 130 134 { 131 notImplemented(); 135 if (m_path) 136 m_path->AddQuadCurveToPoint(control.x(), control.y(), end.x(), end.y()); 132 137 } 133 138 134 void Path::addBezierCurveTo(const FloatPoint& , const FloatPoint&, const FloatPoint&)139 void Path::addBezierCurveTo(const FloatPoint& control1, const FloatPoint& control2, const FloatPoint& end) 135 140 { 136 notImplemented(); 141 if (m_path) 142 m_path->AddCurveToPoint(control1.x(), control1.y(), control2.x(), control2.y(), end.x(), end.y()); 137 143 } 138 144 139 void Path::addArcTo(const FloatPoint& , const FloatPoint&, float)145 void Path::addArcTo(const FloatPoint& point1, const FloatPoint& point2, float radius) 140 146 { 141 notImplemented(); 147 if (m_path) 148 m_path->AddArcToPoint(point1.x(), point1.y(), point2.x(), point2.y(), radius); 142 149 } 143 150 144 151 void Path::closeSubpath() 145 152 { 146 notImplemented(); 153 if (m_path) 154 m_path->CloseSubpath(); 147 155 } 148 156 149 void Path::addArc(const FloatPoint& , float, float, float, bool)157 void Path::addArc(const FloatPoint& point, float radius, float startAngle, float endAngle, bool clockwise) 150 158 { 151 notImplemented(); 159 if (m_path) 160 m_path->AddArc(point.x(), point.y(), radius, startAngle, endAngle, clockwise); 152 161 } 153 162 154 void Path::addRect(const FloatRect& )163 void Path::addRect(const FloatRect& rect) 155 164 { 156 notImplemented(); 165 if (m_path) 166 m_path->AddRectangle(rect.x(), rect.y(), rect.width(), rect.height()); 157 167 } 158 168 159 void Path::addEllipse(const FloatRect& )169 void Path::addEllipse(const FloatRect& rect) 160 170 { 161 notImplemented(); 171 if (m_path) 172 m_path->AddEllipse(rect.x(), rect.y(), rect.width(), rect.height()); 162 173 } 163 174 164 void Path::transform(const AffineTransform& )175 void Path::transform(const AffineTransform& transform) 165 176 { 166 notImplemented(); 177 if (m_path) 178 m_path->Transform(transform); 167 179 } 168 180 … … 174 186 bool Path::isEmpty() const 175 187 { 176 notImplemented(); 177 return false; 188 if (m_path) { 189 wxDouble width, height; 190 m_path->GetBox(NULL, NULL, &width, &height); 191 return (width == 0 && height == 0); 192 } 193 return true; 178 194 } 179 195
Note: See TracChangeset
for help on using the changeset viewer.