| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2012, 2013 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2012, 2013 Adobe Systems Incorporated. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| 11 * notice, this list of conditions and the following disclaimer. | 11 * notice, this list of conditions and the following disclaimer. |
| 12 * 2. Redistributions in binary form must reproduce the above copyright | 12 * 2. Redistributions in binary form must reproduce the above copyright |
| 13 * notice, this list of conditions and the following disclaimer in the | 13 * notice, this list of conditions and the following disclaimer in the |
| 14 * documentation and/or other materials provided with the distribution. | 14 * documentation and/or other materials provided with the distribution. |
| 15 * | 15 * |
| 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY | 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY |
| 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE | 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE |
| 20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, | 20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, |
| 21 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 21 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
| 25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF | 25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
| 26 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 26 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 27 * SUCH DAMAGE. | 27 * SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #ifndef CanvasPathMethods_h | 30 #ifndef CanvasPath_h |
| 31 #define CanvasPathMethods_h | 31 #define CanvasPath_h |
| 32 | 32 |
| 33 #include "modules/ModulesExport.h" | 33 #include "modules/ModulesExport.h" |
| 34 #include "platform/graphics/Path.h" | 34 #include "platform/graphics/Path.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class ExceptionState; | 38 class ExceptionState; |
| 39 | 39 |
| 40 class MODULES_EXPORT CanvasPathMethods { | 40 class MODULES_EXPORT CanvasPath { |
| 41 public: | 41 public: |
| 42 virtual ~CanvasPathMethods() {} | 42 virtual ~CanvasPath() {} |
| 43 | 43 |
| 44 void closePath(); | 44 void closePath(); |
| 45 void moveTo(float x, float y); | 45 void moveTo(float x, float y); |
| 46 void lineTo(float x, float y); | 46 void lineTo(float x, float y); |
| 47 void quadraticCurveTo(float cpx, float cpy, float x, float y); | 47 void quadraticCurveTo(float cpx, float cpy, float x, float y); |
| 48 void bezierCurveTo(float cp1x, | 48 void bezierCurveTo(float cp1x, |
| 49 float cp1y, | 49 float cp1y, |
| 50 float cp2x, | 50 float cp2x, |
| 51 float cp2y, | 51 float cp2y, |
| 52 float x, | 52 float x, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 71 float rotation, | 71 float rotation, |
| 72 float start_angle, | 72 float start_angle, |
| 73 float end_angle, | 73 float end_angle, |
| 74 bool anticlockwise, | 74 bool anticlockwise, |
| 75 ExceptionState&); | 75 ExceptionState&); |
| 76 void rect(float x, float y, float width, float height); | 76 void rect(float x, float y, float width, float height); |
| 77 | 77 |
| 78 virtual bool IsTransformInvertible() const { return true; } | 78 virtual bool IsTransformInvertible() const { return true; } |
| 79 | 79 |
| 80 protected: | 80 protected: |
| 81 CanvasPathMethods() { path_.SetIsVolatile(true); } | 81 CanvasPath() { path_.SetIsVolatile(true); } |
| 82 CanvasPathMethods(const Path& path) : path_(path) { | 82 CanvasPath(const Path& path) : path_(path) { path_.SetIsVolatile(true); } |
| 83 path_.SetIsVolatile(true); | |
| 84 } | |
| 85 Path path_; | 83 Path path_; |
| 86 }; | 84 }; |
| 87 } // namespace blink | 85 } // namespace blink |
| 88 | 86 |
| 89 #endif | 87 #endif |
| OLD | NEW |