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

Side by Side Diff: src/utils/SkLuaCanvas.cpp

Issue 2257023003: Plumb drawArc to SkDevice (Closed) Base URL: https://chromium.googlesource.com/skia.git@distance
Patch Set: Address comments Created 4 years, 4 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
« no previous file with comments | « src/utils/SkDumpCanvas.cpp ('k') | src/utils/SkNWayCanvas.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkLuaCanvas.h" 8 #include "SkLuaCanvas.h"
9 #include "SkLua.h" 9 #include "SkLua.h"
10 10
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 lua.pushArrayPoint(pts, SkToInt(count), "points"); 172 lua.pushArrayPoint(pts, SkToInt(count), "points");
173 lua.pushPaint(paint, "paint"); 173 lua.pushPaint(paint, "paint");
174 } 174 }
175 175
176 void SkLuaCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) { 176 void SkLuaCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) {
177 AUTO_LUA("drawOval"); 177 AUTO_LUA("drawOval");
178 lua.pushRect(rect, "rect"); 178 lua.pushRect(rect, "rect");
179 lua.pushPaint(paint, "paint"); 179 lua.pushPaint(paint, "paint");
180 } 180 }
181 181
182 void SkLuaCanvas::onDrawArc(const SkRect& rect, SkScalar startAngle, SkScalar sw eepAngle,
183 bool useCenter, const SkPaint& paint) {
184 AUTO_LUA("drawArc");
185 lua.pushRect(rect, "rect");
186 lua.pushScalar(startAngle, "startAngle");
187 lua.pushScalar(sweepAngle, "sweepAngle");
188 lua.pushBool(useCenter, "useCenter");
189 lua.pushPaint(paint, "paint");
190 }
191
182 void SkLuaCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) { 192 void SkLuaCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
183 AUTO_LUA("drawRect"); 193 AUTO_LUA("drawRect");
184 lua.pushRect(rect, "rect"); 194 lua.pushRect(rect, "rect");
185 lua.pushPaint(paint, "paint"); 195 lua.pushPaint(paint, "paint");
186 } 196 }
187 197
188 void SkLuaCanvas::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) { 198 void SkLuaCanvas::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) {
189 AUTO_LUA("drawRRect"); 199 AUTO_LUA("drawRRect");
190 lua.pushRRect(rrect, "rrect"); 200 lua.pushRRect(rrect, "rrect");
191 lua.pushPaint(paint, "paint"); 201 lua.pushPaint(paint, "paint");
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } 308 }
299 309
300 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount, 310 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount,
301 const SkPoint vertices[], const SkPoint texs[], 311 const SkPoint vertices[], const SkPoint texs[],
302 const SkColor colors[], SkXfermode* xmode, 312 const SkColor colors[], SkXfermode* xmode,
303 const uint16_t indices[], int indexCount, 313 const uint16_t indices[], int indexCount,
304 const SkPaint& paint) { 314 const SkPaint& paint) {
305 AUTO_LUA("drawVertices"); 315 AUTO_LUA("drawVertices");
306 lua.pushPaint(paint, "paint"); 316 lua.pushPaint(paint, "paint");
307 } 317 }
OLDNEW
« no previous file with comments | « src/utils/SkDumpCanvas.cpp ('k') | src/utils/SkNWayCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698