| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 lua.pushPaint(paint, "paint"); | 199 lua.pushPaint(paint, "paint"); |
| 200 } | 200 } |
| 201 | 201 |
| 202 void SkLuaCanvas::drawPath(const SkPath& path, const SkPaint& paint) { | 202 void SkLuaCanvas::drawPath(const SkPath& path, const SkPaint& paint) { |
| 203 AUTO_LUA("drawPath"); | 203 AUTO_LUA("drawPath"); |
| 204 lua.pushPath(path, "path"); | 204 lua.pushPath(path, "path"); |
| 205 lua.pushPaint(paint, "paint"); | 205 lua.pushPaint(paint, "paint"); |
| 206 } | 206 } |
| 207 | 207 |
| 208 void SkLuaCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, | 208 void SkLuaCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, |
| 209 const SkPaint* paint) { | 209 const SkPaint* paint) { |
| 210 AUTO_LUA("drawBitmap"); | 210 AUTO_LUA("drawBitmap"); |
| 211 if (paint) { | 211 if (paint) { |
| 212 lua.pushPaint(*paint, "paint"); | 212 lua.pushPaint(*paint, "paint"); |
| 213 } | 213 } |
| 214 } | 214 } |
| 215 | 215 |
| 216 void SkLuaCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src
, | 216 void SkLuaCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src
, |
| 217 const SkRect& dst, const SkPaint* paint) { | 217 const SkRect& dst, const SkPaint* paint, |
| 218 DrawBitmapRectFlags flags) { |
| 218 AUTO_LUA("drawBitmapRectToRect"); | 219 AUTO_LUA("drawBitmapRectToRect"); |
| 219 if (paint) { | 220 if (paint) { |
| 220 lua.pushPaint(*paint, "paint"); | 221 lua.pushPaint(*paint, "paint"); |
| 221 } | 222 } |
| 222 } | 223 } |
| 223 | 224 |
| 224 void SkLuaCanvas::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, | 225 void SkLuaCanvas::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, |
| 225 const SkPaint* paint) { | 226 const SkPaint* paint) { |
| 226 AUTO_LUA("drawBitmapMatrix"); | 227 AUTO_LUA("drawBitmapMatrix"); |
| 227 if (paint) { | 228 if (paint) { |
| 228 lua.pushPaint(*paint, "paint"); | 229 lua.pushPaint(*paint, "paint"); |
| 229 } | 230 } |
| 230 } | 231 } |
| 231 | 232 |
| 232 void SkLuaCanvas::drawSprite(const SkBitmap& bitmap, int x, int y, | 233 void SkLuaCanvas::drawSprite(const SkBitmap& bitmap, int x, int y, |
| 233 const SkPaint* paint) { | 234 const SkPaint* paint) { |
| 234 AUTO_LUA("drawSprite"); | 235 AUTO_LUA("drawSprite"); |
| 235 if (paint) { | 236 if (paint) { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |