| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 238 } |
| 239 | 239 |
| 240 void SkLuaCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, const
SkRect& dst, | 240 void SkLuaCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, const
SkRect& dst, |
| 241 const SkPaint* paint, SrcRectConstraint) { | 241 const SkPaint* paint, SrcRectConstraint) { |
| 242 AUTO_LUA("drawImageRect"); | 242 AUTO_LUA("drawImageRect"); |
| 243 if (paint) { | 243 if (paint) { |
| 244 lua.pushPaint(*paint, "paint"); | 244 lua.pushPaint(*paint, "paint"); |
| 245 } | 245 } |
| 246 } | 246 } |
| 247 | 247 |
| 248 void SkLuaCanvas::onDrawSprite(const SkBitmap& bitmap, int x, int y, const SkPai
nt* paint) { | |
| 249 AUTO_LUA("drawSprite"); | |
| 250 if (paint) { | |
| 251 lua.pushPaint(*paint, "paint"); | |
| 252 } | |
| 253 } | |
| 254 | |
| 255 void SkLuaCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, Sk
Scalar y, | 248 void SkLuaCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, Sk
Scalar y, |
| 256 const SkPaint& paint) { | 249 const SkPaint& paint) { |
| 257 AUTO_LUA("drawText"); | 250 AUTO_LUA("drawText"); |
| 258 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength); | 251 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength); |
| 259 lua.pushPaint(paint, "paint"); | 252 lua.pushPaint(paint, "paint"); |
| 260 } | 253 } |
| 261 | 254 |
| 262 void SkLuaCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPoi
nt pos[], | 255 void SkLuaCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPoi
nt pos[], |
| 263 const SkPaint& paint) { | 256 const SkPaint& paint) { |
| 264 AUTO_LUA("drawPosText"); | 257 AUTO_LUA("drawPosText"); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 } | 291 } |
| 299 | 292 |
| 300 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount, | 293 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount, |
| 301 const SkPoint vertices[], const SkPoint texs[], | 294 const SkPoint vertices[], const SkPoint texs[], |
| 302 const SkColor colors[], SkXfermode* xmode, | 295 const SkColor colors[], SkXfermode* xmode, |
| 303 const uint16_t indices[], int indexCount, | 296 const uint16_t indices[], int indexCount, |
| 304 const SkPaint& paint) { | 297 const SkPaint& paint) { |
| 305 AUTO_LUA("drawVertices"); | 298 AUTO_LUA("drawVertices"); |
| 306 lua.pushPaint(paint, "paint"); | 299 lua.pushPaint(paint, "paint"); |
| 307 } | 300 } |
| OLD | NEW |