| OLD | NEW |
| 1 // Copyright (c) 2008, Google Inc. | 1 // Copyright (c) 2008, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 Path::Path() | 46 Path::Path() |
| 47 : m_path(0) | 47 : m_path(0) |
| 48 { | 48 { |
| 49 } | 49 } |
| 50 | 50 |
| 51 Path::Path(const Path& other) | 51 Path::Path(const Path& other) |
| 52 { | 52 { |
| 53 m_path = other.m_path ? new SkPath(*other.m_path) : 0; | 53 m_path = other.m_path ? new SkPath(*other.m_path) : 0; |
| 54 } | 54 } |
| 55 | 55 |
| 56 #if PLATFORM(BLACKBERRY) | |
| 57 Path::Path(const SkPath& path) | |
| 58 { | |
| 59 m_path = new SkPath(path); | |
| 60 } | |
| 61 #endif | |
| 62 | |
| 63 Path::~Path() | 56 Path::~Path() |
| 64 { | 57 { |
| 65 if (m_path) | 58 if (m_path) |
| 66 delete m_path; | 59 delete m_path; |
| 67 } | 60 } |
| 68 | 61 |
| 69 PlatformPathPtr Path::ensurePlatformPath() | 62 PlatformPathPtr Path::ensurePlatformPath() |
| 70 { | 63 { |
| 71 if (!m_path) | 64 if (!m_path) |
| 72 m_path = new SkPath(); | 65 m_path = new SkPath(); |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 scratch->platformContext()->setupPaintForStroking(&paint, 0, 0); | 297 scratch->platformContext()->setupPaintForStroking(&paint, 0, 0); |
| 305 SkPath strokePath; | 298 SkPath strokePath; |
| 306 paint.getFillPath(*platformPath(), &strokePath); | 299 paint.getFillPath(*platformPath(), &strokePath); |
| 307 bool contains = SkPathContainsPoint(&strokePath, point, SkPath::kWinding_Fil
lType); | 300 bool contains = SkPathContainsPoint(&strokePath, point, SkPath::kWinding_Fil
lType); |
| 308 | 301 |
| 309 scratch->restore(); | 302 scratch->restore(); |
| 310 return contains; | 303 return contains; |
| 311 } | 304 } |
| 312 | 305 |
| 313 } // namespace WebCore | 306 } // namespace WebCore |
| OLD | NEW |