Changeset 80557 in webkit
- Timestamp:
- Mar 8, 2011 3:18:08 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r80555 r80557 1 2011-03-08 Andreas Kling <kling@webkit.org> 2 3 Reviewed by Antonio Gomes. 4 5 Path: Make measurement functions const 6 https://bugs.webkit.org/show_bug.cgi?id=55914 7 8 * platform/graphics/Path.cpp: 9 (WebCore::Path::length): 10 (WebCore::Path::pointAtLength): 11 (WebCore::Path::normalAngleAtLength): 12 * platform/graphics/Path.h: 13 * platform/graphics/cairo/PathCairo.cpp: 14 (WebCore::Path::strokeBoundingRect): 15 * platform/graphics/cg/PathCG.cpp: 16 (WebCore::Path::strokeBoundingRect): 17 * platform/graphics/openvg/PathOpenVG.cpp: 18 (WebCore::Path::strokeBoundingRect): 19 (WebCore::Path::length): 20 (WebCore::Path::pointAtLength): 21 (WebCore::Path::normalAngleAtLength): 22 * platform/graphics/qt/PathQt.cpp: 23 (WebCore::Path::strokeBoundingRect): 24 (WebCore::Path::length): 25 (WebCore::Path::pointAtLength): 26 (WebCore::Path::normalAngleAtLength): 27 * platform/graphics/skia/PathSkia.cpp: 28 (WebCore::Path::strokeBoundingRect): 29 * platform/graphics/wince/PathWinCE.cpp: 30 (WebCore::Path::strokeBoundingRect): 31 * platform/graphics/wx/PathWx.cpp: 32 (WebCore::Path::strokeBoundingRect): 33 1 34 2011-03-08 Carlos Garcia Campos <cgarcia@igalia.com> 2 35 -
trunk/Source/WebCore/platform/graphics/Path.cpp
r69519 r80557 84 84 } 85 85 86 float Path::length() 86 float Path::length() const 87 87 { 88 88 PathTraversalState traversalState(PathTraversalState::TraversalTotalLength); … … 91 91 } 92 92 93 FloatPoint Path::pointAtLength(float length, bool& ok) 93 FloatPoint Path::pointAtLength(float length, bool& ok) const 94 94 { 95 95 PathTraversalState traversalState(PathTraversalState::TraversalPointAtLength); … … 100 100 } 101 101 102 float Path::normalAngleAtLength(float length, bool& ok) 102 float Path::normalAngleAtLength(float length, bool& ok) const 103 103 { 104 104 PathTraversalState traversalState(PathTraversalState::TraversalNormalAngleAtLength); -
trunk/Source/WebCore/platform/graphics/Path.h
r79578 r80557 113 113 bool strokeContains(StrokeStyleApplier*, const FloatPoint&) const; 114 114 FloatRect boundingRect() const; 115 FloatRect strokeBoundingRect(StrokeStyleApplier* = 0) ;115 FloatRect strokeBoundingRect(StrokeStyleApplier* = 0) const; 116 116 117 float length() ;118 FloatPoint pointAtLength(float length, bool& ok) ;119 float normalAngleAtLength(float length, bool& ok) ;117 float length() const; 118 FloatPoint pointAtLength(float length, bool& ok) const; 119 float normalAngleAtLength(float length, bool& ok) const; 120 120 121 121 void clear(); -
trunk/Source/WebCore/platform/graphics/cairo/PathCairo.cpp
r79541 r80557 282 282 } 283 283 284 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) 284 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const 285 285 { 286 286 cairo_t* cr = platformPath()->context(); -
trunk/Source/WebCore/platform/graphics/cg/PathCG.cpp
r74733 r80557 167 167 } 168 168 169 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) 169 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const 170 170 { 171 171 CGContextRef context = scratchContext(); -
trunk/Source/WebCore/platform/graphics/openvg/PathOpenVG.cpp
r69505 r80557 170 170 } 171 171 172 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) 172 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const 173 173 { 174 174 notImplemented(); … … 465 465 // as primary path storage. 466 466 467 float Path::length() 467 float Path::length() const 468 468 { 469 469 m_path->makeCompatibleContextCurrent(); … … 473 473 } 474 474 475 FloatPoint Path::pointAtLength(float length, bool& ok) 475 FloatPoint Path::pointAtLength(float length, bool& ok) const 476 476 { 477 477 VGfloat x = 0, y = 0; … … 484 484 } 485 485 486 float Path::normalAngleAtLength(float length, bool& ok) 486 float Path::normalAngleAtLength(float length, bool& ok) const 487 487 { 488 488 VGfloat tangentX, tangentY; -
trunk/Source/WebCore/platform/graphics/qt/PathQt.cpp
r76686 r80557 155 155 } 156 156 157 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) 157 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const 158 158 { 159 159 GraphicsContext* context = scratchContext(); … … 410 410 } 411 411 412 float Path::length() 412 float Path::length() const 413 413 { 414 414 return m_path.length(); 415 415 } 416 416 417 FloatPoint Path::pointAtLength(float length, bool& ok) 417 FloatPoint Path::pointAtLength(float length, bool& ok) const 418 418 { 419 419 ok = (length >= 0 && length <= m_path.length()); … … 425 425 } 426 426 427 float Path::normalAngleAtLength(float length, bool& ok) 427 float Path::normalAngleAtLength(float length, bool& ok) const 428 428 { 429 429 ok = (length >= 0 && length <= m_path.length()); -
trunk/Source/WebCore/platform/graphics/skia/PathSkia.cpp
r80409 r80557 229 229 } 230 230 231 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) 231 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const 232 232 { 233 233 GraphicsContext* scratch = scratchContext(); -
trunk/Source/WebCore/platform/graphics/wince/PathWinCE.cpp
r69505 r80557 134 134 } 135 135 136 FloatRect Path::strokeBoundingRect(StrokeStyleApplier *)136 FloatRect Path::strokeBoundingRect(StrokeStyleApplier*) const 137 137 { 138 138 notImplemented(); -
trunk/Source/WebCore/platform/graphics/wx/PathWx.cpp
r69505 r80557 106 106 } 107 107 108 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) 108 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const 109 109 { 110 110 notImplemented();
Note: See TracChangeset
for help on using the changeset viewer.