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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 Path::Path() | 43 Path::Path() |
44 : m_path() | 44 : m_path() |
45 { | 45 { |
46 } | 46 } |
47 | 47 |
48 Path::Path(const Path& other) | 48 Path::Path(const Path& other) |
49 { | 49 { |
50 m_path = SkPath(other.m_path); | 50 m_path = SkPath(other.m_path); |
51 } | 51 } |
52 | 52 |
| 53 Path::Path(const SkPath& other) |
| 54 { |
| 55 m_path = other; |
| 56 } |
| 57 |
53 Path::~Path() | 58 Path::~Path() |
54 { | 59 { |
55 } | 60 } |
56 | 61 |
57 Path& Path::operator=(const Path& other) | 62 Path& Path::operator=(const Path& other) |
58 { | 63 { |
59 m_path = SkPath(other.m_path); | 64 m_path = SkPath(other.m_path); |
60 return *this; | 65 return *this; |
61 } | 66 } |
62 | 67 |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 bool Path::subtractPath(const Path& other) | 506 bool Path::subtractPath(const Path& other) |
502 { | 507 { |
503 return Op(m_path, other.m_path, kDifference_SkPathOp, &m_path); | 508 return Op(m_path, other.m_path, kDifference_SkPathOp, &m_path); |
504 } | 509 } |
505 | 510 |
506 bool Path::unionPath(const Path& other) | 511 bool Path::unionPath(const Path& other) |
507 { | 512 { |
508 return Op(m_path, other.m_path, kUnion_SkPathOp, &m_path); | 513 return Op(m_path, other.m_path, kUnion_SkPathOp, &m_path); |
509 } | 514 } |
510 | 515 |
| 516 bool Path::intersectPath(const Path& other) |
| 517 { |
| 518 return Op(m_path, other.m_path, kIntersect_SkPathOp, &m_path); |
| 519 } |
| 520 |
511 #if ENABLE(ASSERT) | 521 #if ENABLE(ASSERT) |
512 bool ellipseIsRenderable(float startAngle, float endAngle) | 522 bool ellipseIsRenderable(float startAngle, float endAngle) |
513 { | 523 { |
514 return (std::abs(endAngle - startAngle) < twoPiFloat) | 524 return (std::abs(endAngle - startAngle) < twoPiFloat) |
515 || WebCoreFloatNearlyEqual(std::abs(endAngle - startAngle), twoPiFloat); | 525 || WebCoreFloatNearlyEqual(std::abs(endAngle - startAngle), twoPiFloat); |
516 } | 526 } |
517 #endif | 527 #endif |
518 | 528 |
519 } // namespace blink | 529 } // namespace blink |
OLD | NEW |