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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 } | 231 } |
232 | 232 |
233 void SkLuaCanvas::onDrawImage(const SkImage* image, SkScalar x, SkScalar y, cons
t SkPaint* paint) { | 233 void SkLuaCanvas::onDrawImage(const SkImage* image, SkScalar x, SkScalar y, cons
t SkPaint* paint) { |
234 AUTO_LUA("drawImage"); | 234 AUTO_LUA("drawImage"); |
235 if (paint) { | 235 if (paint) { |
236 lua.pushPaint(*paint, "paint"); | 236 lua.pushPaint(*paint, "paint"); |
237 } | 237 } |
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) { | 241 const SkPaint* paint SRC_RECT_CONSTRAINT_PARAM
(constraint)) { |
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) { | 248 void SkLuaCanvas::onDrawSprite(const SkBitmap& bitmap, int x, int y, const SkPai
nt* paint) { |
249 AUTO_LUA("drawSprite"); | 249 AUTO_LUA("drawSprite"); |
250 if (paint) { | 250 if (paint) { |
251 lua.pushPaint(*paint, "paint"); | 251 lua.pushPaint(*paint, "paint"); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 } | 298 } |
299 | 299 |
300 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount, | 300 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount, |
301 const SkPoint vertices[], const SkPoint texs[], | 301 const SkPoint vertices[], const SkPoint texs[], |
302 const SkColor colors[], SkXfermode* xmode, | 302 const SkColor colors[], SkXfermode* xmode, |
303 const uint16_t indices[], int indexCount, | 303 const uint16_t indices[], int indexCount, |
304 const SkPaint& paint) { | 304 const SkPaint& paint) { |
305 AUTO_LUA("drawVertices"); | 305 AUTO_LUA("drawVertices"); |
306 lua.pushPaint(paint, "paint"); | 306 lua.pushPaint(paint, "paint"); |
307 } | 307 } |
OLD | NEW |