Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasPathMethods.h

Issue 2826773002: Rename CanvasPathMethods to CanvasPath (Closed)
Patch Set: x Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved.
4 * Copyright (C) 2012, 2013 Adobe Systems Incorporated. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
21 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
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
27 * SUCH DAMAGE.
28 */
29
30 #ifndef CanvasPathMethods_h
31 #define CanvasPathMethods_h
32
33 #include "modules/ModulesExport.h"
34 #include "platform/graphics/Path.h"
35
36 namespace blink {
37
38 class ExceptionState;
39
40 class MODULES_EXPORT CanvasPathMethods {
41 public:
42 virtual ~CanvasPathMethods() {}
43
44 void closePath();
45 void moveTo(float x, float y);
46 void lineTo(float x, float y);
47 void quadraticCurveTo(float cpx, float cpy, float x, float y);
48 void bezierCurveTo(float cp1x,
49 float cp1y,
50 float cp2x,
51 float cp2y,
52 float x,
53 float y);
54 void arcTo(float x0,
55 float y0,
56 float x1,
57 float y1,
58 float radius,
59 ExceptionState&);
60 void arc(float x,
61 float y,
62 float radius,
63 float start_angle,
64 float end_angle,
65 bool anticlockwise,
66 ExceptionState&);
67 void ellipse(float x,
68 float y,
69 float radius_x,
70 float radius_y,
71 float rotation,
72 float start_angle,
73 float end_angle,
74 bool anticlockwise,
75 ExceptionState&);
76 void rect(float x, float y, float width, float height);
77
78 virtual bool IsTransformInvertible() const { return true; }
79
80 protected:
81 CanvasPathMethods() { path_.SetIsVolatile(true); }
82 CanvasPathMethods(const Path& path) : path_(path) {
83 path_.SetIsVolatile(true);
84 }
85 Path path_;
86 };
87 } // namespace blink
88
89 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698