OLD | NEW |
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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 } | 261 } |
262 | 262 |
263 void SkLuaCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const Sk
Path& path, | 263 void SkLuaCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const Sk
Path& path, |
264 const SkMatrix* matrix, const SkPaint& paint)
{ | 264 const SkMatrix* matrix, const SkPaint& paint)
{ |
265 AUTO_LUA("drawTextOnPath"); | 265 AUTO_LUA("drawTextOnPath"); |
266 lua.pushPath(path, "path"); | 266 lua.pushPath(path, "path"); |
267 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength); | 267 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength); |
268 lua.pushPaint(paint, "paint"); | 268 lua.pushPaint(paint, "paint"); |
269 } | 269 } |
270 | 270 |
271 void SkLuaCanvas::onDrawPicture(const SkPicture* picture) { | 271 void SkLuaCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix
, |
| 272 const SkPaint* paint) { |
272 AUTO_LUA("drawPicture"); | 273 AUTO_LUA("drawPicture"); |
273 // call through so we can see the nested picture ops | 274 // call through so we can see the nested picture ops |
274 this->INHERITED::onDrawPicture(picture); | 275 this->INHERITED::onDrawPicture(picture, matrix, paint); |
275 } | 276 } |
276 | 277 |
277 void SkLuaCanvas::drawVertices(VertexMode vmode, int vertexCount, | 278 void SkLuaCanvas::drawVertices(VertexMode vmode, int vertexCount, |
278 const SkPoint vertices[], const SkPoint texs[], | 279 const SkPoint vertices[], const SkPoint texs[], |
279 const SkColor colors[], SkXfermode* xmode, | 280 const SkColor colors[], SkXfermode* xmode, |
280 const uint16_t indices[], int indexCount, | 281 const uint16_t indices[], int indexCount, |
281 const SkPaint& paint) { | 282 const SkPaint& paint) { |
282 AUTO_LUA("drawVertices"); | 283 AUTO_LUA("drawVertices"); |
283 lua.pushPaint(paint, "paint"); | 284 lua.pushPaint(paint, "paint"); |
284 } | 285 } |
285 | 286 |
286 void SkLuaCanvas::drawData(const void* data, size_t length) { | 287 void SkLuaCanvas::drawData(const void* data, size_t length) { |
287 AUTO_LUA("drawData"); | 288 AUTO_LUA("drawData"); |
288 } | 289 } |
OLD | NEW |