Changeset 66979 in webkit
- Timestamp:
- Sep 8, 2010 7:07:01 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r66974 r66979 1 2010-09-08 Jan E Hanssen <jhanssen@sencha.com> 2 3 Reviewed by Dirk Schulze. 4 5 Add a test for getting a point beyond the length of the path 6 https://bugs.webkit.org/show_bug.cgi?id=43837 7 8 * svg/dom/path-pointAtLength-expected.txt: 9 * svg/dom/script-tests/path-pointAtLength.js: 10 1 11 2010-09-08 Yael Aharon <yael.aharon@nokia.com> 2 12 -
trunk/LayoutTests/svg/dom/path-pointAtLength-expected.txt
r66208 r66979 7 7 PASS pointAtLengthOfPath('M0,20 L400,20 L640,20 z') is '(580, 20)' 8 8 PASS pointAtLengthOfPath('M0,20 L400,20 z M 320,20 L640,20') is '(100, 20)' 9 PASS pointAtLengthOfPath('M0,20 L20,40') is '(20, 40)' 9 10 PASS successfullyParsed is true 10 11 -
trunk/LayoutTests/svg/dom/script-tests/path-pointAtLength.js
r66208 r66979 13 13 shouldBe("pointAtLengthOfPath('M0,20 L400,20 L640,20 z')", "'(580, 20)'"); 14 14 shouldBe("pointAtLengthOfPath('M0,20 L400,20 z M 320,20 L640,20')", "'(100, 20)'"); 15 shouldBe("pointAtLengthOfPath('M0,20 L20,40')", "'(20, 40)'"); 15 16 16 17 var successfullyParsed = true; -
trunk/WebCore/ChangeLog
r66978 r66979 1 2010-09-08 Jan E Hanssen <jhanssen@sencha.com> 2 3 Reviewed by Dirk Schulze. 4 5 [Qt] PathQt should use the QPainterPath functionality for calculations 6 https://bugs.webkit.org/show_bug.cgi?id=43837 7 8 Change PathQt to use the built-in functionality of QPainterPath for 9 calculating length(), pointAtLength() and normalAngleAtLength(). 10 11 * platform/graphics/Path.cpp: 12 * platform/graphics/qt/PathQt.cpp: 13 (WebCore::Path::length): 14 (WebCore::Path::pointAtLength): 15 (WebCore::Path::normalAngleAtLength): 16 1 17 2010-09-08 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 18 -
trunk/WebCore/platform/graphics/Path.cpp
r65370 r66979 40 40 namespace WebCore { 41 41 42 #if !PLATFORM(OPENVG) 42 #if !PLATFORM(OPENVG) && !PLATFORM(QT) 43 43 static void pathLengthApplierFunction(void* info, const PathElement* element) 44 44 { -
trunk/WebCore/platform/graphics/qt/PathQt.cpp
r66948 r66979 475 475 } 476 476 477 float Path::length() 478 { 479 return m_path.length(); 480 } 481 482 FloatPoint Path::pointAtLength(float length, bool& ok) 483 { 484 ok = (length >= 0 && length <= m_path.length()); 485 486 qreal percent = m_path.percentAtLength(length); 487 QPointF point = m_path.pointAtPercent(percent); 488 489 return point; 490 } 491 492 float Path::normalAngleAtLength(float length, bool& ok) 493 { 494 ok = (length >= 0 && length <= m_path.length()); 495 496 qreal percent = m_path.percentAtLength(length); 497 qreal angle = m_path.angleAtPercent(percent); 498 499 return angle; 500 } 501 477 502 } 478 503
Note: See TracChangeset
for help on using the changeset viewer.