| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. |
| 3 * 2006 Rob Buis <buis@kde.org> | 3 * 2006 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2013 Google Inc. All rights reserved. | 5 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 6 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 6 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 7 * | 7 * |
| 8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 10 * are met: | 10 * are met: |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 FloatPoint(rect.x(), rect.maxY() - bottomLeftRadius.height())); | 465 FloatPoint(rect.x(), rect.maxY() - bottomLeftRadius.height())); |
| 466 addLineTo(FloatPoint(rect.x(), rect.y() + topLeftRadius.height())); | 466 addLineTo(FloatPoint(rect.x(), rect.y() + topLeftRadius.height())); |
| 467 if (topLeftRadius.width() > 0 || topLeftRadius.height() > 0) | 467 if (topLeftRadius.width() > 0 || topLeftRadius.height() > 0) |
| 468 addBezierCurveTo(FloatPoint(rect.x(), rect.y() + topLeftRadius.height()
* gCircleControlPoint), | 468 addBezierCurveTo(FloatPoint(rect.x(), rect.y() + topLeftRadius.height()
* gCircleControlPoint), |
| 469 FloatPoint(rect.x() + topLeftRadius.width() * gCircleControlPoint, r
ect.y()), | 469 FloatPoint(rect.x() + topLeftRadius.width() * gCircleControlPoint, r
ect.y()), |
| 470 FloatPoint(rect.x() + topLeftRadius.width(), rect.y())); | 470 FloatPoint(rect.x() + topLeftRadius.width(), rect.y())); |
| 471 | 471 |
| 472 closeSubpath(); | 472 closeSubpath(); |
| 473 } | 473 } |
| 474 | 474 |
| 475 void Path::addPath(const Path& src, const AffineTransform& transform) |
| 476 { |
| 477 m_path.addPath(src.skPath(), affineTransformToSkMatrix(transform)); |
| 478 } |
| 479 |
| 475 void Path::translate(const FloatSize& size) | 480 void Path::translate(const FloatSize& size) |
| 476 { | 481 { |
| 477 m_path.offset(WebCoreFloatToSkScalar(size.width()), WebCoreFloatToSkScalar(s
ize.height())); | 482 m_path.offset(WebCoreFloatToSkScalar(size.width()), WebCoreFloatToSkScalar(s
ize.height())); |
| 478 } | 483 } |
| 479 | 484 |
| 480 bool Path::unionPath(const Path& other) | 485 bool Path::unionPath(const Path& other) |
| 481 { | 486 { |
| 482 return Op(m_path, other.m_path, kUnion_PathOp, &m_path); | 487 return Op(m_path, other.m_path, kUnion_PathOp, &m_path); |
| 483 } | 488 } |
| 484 | 489 |
| 485 #if !ASSERT_DISABLED | 490 #if !ASSERT_DISABLED |
| 486 bool ellipseIsRenderable(float startAngle, float endAngle) | 491 bool ellipseIsRenderable(float startAngle, float endAngle) |
| 487 { | 492 { |
| 488 return (std::abs(endAngle - startAngle) < twoPiFloat) | 493 return (std::abs(endAngle - startAngle) < twoPiFloat) |
| 489 || WebCoreFloatNearlyEqual(std::abs(endAngle - startAngle), twoPiFloat); | 494 || WebCoreFloatNearlyEqual(std::abs(endAngle - startAngle), twoPiFloat); |
| 490 } | 495 } |
| 491 #endif | 496 #endif |
| 492 | 497 |
| 493 } | 498 } |
| OLD | NEW |