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

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

Issue 933483002: add Method param to drawTextOnPath, supporting SVG spec Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add guard for android Created 5 years, 10 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 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 267 }
268 268
269 void SkLuaCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkSc alar xpos[], 269 void SkLuaCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkSc alar xpos[],
270 SkScalar constY, const SkPaint& paint) { 270 SkScalar constY, const SkPaint& paint) {
271 AUTO_LUA("drawPosTextH"); 271 AUTO_LUA("drawPosTextH");
272 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength); 272 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength);
273 lua.pushPaint(paint, "paint"); 273 lua.pushPaint(paint, "paint");
274 } 274 }
275 275
276 void SkLuaCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const Sk Path& path, 276 void SkLuaCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const Sk Path& path,
277 const SkMatrix* matrix, const SkPaint& paint) { 277 const SkMatrix* matrix,
278 SK_SUPPORT_LEGACY_DRAWTEXTONPATH_PARAM const SkPaint& paint) {
278 AUTO_LUA("drawTextOnPath"); 279 AUTO_LUA("drawTextOnPath");
279 lua.pushPath(path, "path"); 280 lua.pushPath(path, "path");
280 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength); 281 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength);
281 lua.pushPaint(paint, "paint"); 282 lua.pushPaint(paint, "paint");
282 } 283 }
283 284
284 void SkLuaCanvas::onDrawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, 285 void SkLuaCanvas::onDrawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y,
285 const SkPaint &paint) { 286 const SkPaint &paint) {
286 AUTO_LUA("drawTextBlob"); 287 AUTO_LUA("drawTextBlob");
287 lua.pushTextBlob(blob, "blob"); 288 lua.pushTextBlob(blob, "blob");
(...skipping 10 matching lines...) Expand all
298 } 299 }
299 300
300 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount, 301 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount,
301 const SkPoint vertices[], const SkPoint texs[], 302 const SkPoint vertices[], const SkPoint texs[],
302 const SkColor colors[], SkXfermode* xmode, 303 const SkColor colors[], SkXfermode* xmode,
303 const uint16_t indices[], int indexCount, 304 const uint16_t indices[], int indexCount,
304 const SkPaint& paint) { 305 const SkPaint& paint) {
305 AUTO_LUA("drawVertices"); 306 AUTO_LUA("drawVertices");
306 lua.pushPaint(paint, "paint"); 307 lua.pushPaint(paint, "paint");
307 } 308 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698