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::onDrawTextBlob(const SkTextBlob* blob, const SkPoint& offset, |
| 272 const SkPaint& paint) { |
| 273 AUTO_LUA("drawTextBlob"); |
| 274 // FIXME: impl |
| 275 } |
| 276 |
271 void SkLuaCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix
, | 277 void SkLuaCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix
, |
272 const SkPaint* paint) { | 278 const SkPaint* paint) { |
273 AUTO_LUA("drawPicture"); | 279 AUTO_LUA("drawPicture"); |
274 // call through so we can see the nested picture ops | 280 // call through so we can see the nested picture ops |
275 this->INHERITED::onDrawPicture(picture, matrix, paint); | 281 this->INHERITED::onDrawPicture(picture, matrix, paint); |
276 } | 282 } |
277 | 283 |
278 void SkLuaCanvas::drawVertices(VertexMode vmode, int vertexCount, | 284 void SkLuaCanvas::drawVertices(VertexMode vmode, int vertexCount, |
279 const SkPoint vertices[], const SkPoint texs[], | 285 const SkPoint vertices[], const SkPoint texs[], |
280 const SkColor colors[], SkXfermode* xmode, | 286 const SkColor colors[], SkXfermode* xmode, |
281 const uint16_t indices[], int indexCount, | 287 const uint16_t indices[], int indexCount, |
282 const SkPaint& paint) { | 288 const SkPaint& paint) { |
283 AUTO_LUA("drawVertices"); | 289 AUTO_LUA("drawVertices"); |
284 lua.pushPaint(paint, "paint"); | 290 lua.pushPaint(paint, "paint"); |
285 } | 291 } |
286 | 292 |
287 void SkLuaCanvas::drawData(const void* data, size_t length) { | 293 void SkLuaCanvas::drawData(const void* data, size_t length) { |
288 AUTO_LUA("drawData"); | 294 AUTO_LUA("drawData"); |
289 } | 295 } |
OLD | NEW |