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

Side by Side Diff: Source/core/platform/graphics/Path.h

Issue 14298022: Add support for new canvas ellipse method. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make canvas-ellipse-360-winding.html for virtual/gpu pass. Created 7 years, 3 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
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved.
3 * 2006 Rob Buis <buis@kde.org> 3 * 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007-2008 Torch Mobile, Inc. 4 * Copyright (C) 2007-2008 Torch Mobile, Inc.
5 * Copyright (C) 2013 Google Inc. All rights reserved. 5 * Copyright (C) 2013 Google Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 void moveTo(const FloatPoint&); 97 void moveTo(const FloatPoint&);
98 void addLineTo(const FloatPoint&); 98 void addLineTo(const FloatPoint&);
99 void addQuadCurveTo(const FloatPoint& controlPoint, const FloatPoint& endPoi nt); 99 void addQuadCurveTo(const FloatPoint& controlPoint, const FloatPoint& endPoi nt);
100 void addBezierCurveTo(const FloatPoint& controlPoint1, const FloatPoint& con trolPoint2, const FloatPoint& endPoint); 100 void addBezierCurveTo(const FloatPoint& controlPoint1, const FloatPoint& con trolPoint2, const FloatPoint& endPoint);
101 void addArcTo(const FloatPoint&, const FloatPoint&, float radius); 101 void addArcTo(const FloatPoint&, const FloatPoint&, float radius);
102 void closeSubpath(); 102 void closeSubpath();
103 103
104 void addArc(const FloatPoint&, float radius, float startAngle, float endAngl e, bool anticlockwise); 104 void addArc(const FloatPoint&, float radius, float startAngle, float endAngl e, bool anticlockwise);
105 void addRect(const FloatRect&); 105 void addRect(const FloatRect&);
106 void addEllipse(const FloatPoint&, float radiusX, float radiusY, float rotat ion, float startAngle, float endAngle, bool anticlockwise);
106 void addEllipse(const FloatRect&); 107 void addEllipse(const FloatRect&);
107 108
108 void addRoundedRect(const FloatRect&, const FloatSize& roundingRadii); 109 void addRoundedRect(const FloatRect&, const FloatSize& roundingRadii);
109 void addRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& b ottomRightRadius); 110 void addRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& b ottomRightRadius);
110 void addRoundedRect(const RoundedRect&); 111 void addRoundedRect(const RoundedRect&);
111 112
112 void translate(const FloatSize&); 113 void translate(const FloatSize&);
113 114
114 const SkPath& skPath() const { return m_path; } 115 const SkPath& skPath() const { return m_path; }
115 116
116 void apply(void* info, PathApplierFunction) const; 117 void apply(void* info, PathApplierFunction) const;
117 void transform(const AffineTransform&); 118 void transform(const AffineTransform&);
118 119
119 void addPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Float Size& bottomRightRadius); 120 void addPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Float Size& bottomRightRadius);
120 void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadi us, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Fl oatSize& bottomRightRadius); 121 void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadi us, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Fl oatSize& bottomRightRadius);
121 122
122 // Updates the path to the union (inclusive-or) of itself with the given arg ument. 123 // Updates the path to the union (inclusive-or) of itself with the given arg ument.
123 bool unionPath(const Path& other); 124 bool unionPath(const Path& other);
124 125
125 private: 126 private:
126 SkPath m_path; 127 SkPath m_path;
127 }; 128 };
128 129
129 } 130 }
130 131
131 #endif 132 #endif
OLDNEW
« no previous file with comments | « Source/core/html/canvas/CanvasRenderingContext2D.idl ('k') | Source/core/platform/graphics/Path.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698