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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 208 |
209 void SkLuaCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, | 209 void SkLuaCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, |
210 const SkPaint* paint) { | 210 const SkPaint* paint) { |
211 AUTO_LUA("drawBitmap"); | 211 AUTO_LUA("drawBitmap"); |
212 if (paint) { | 212 if (paint) { |
213 lua.pushPaint(*paint, "paint"); | 213 lua.pushPaint(*paint, "paint"); |
214 } | 214 } |
215 } | 215 } |
216 | 216 |
217 void SkLuaCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, co
nst SkRect& dst, | 217 void SkLuaCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, co
nst SkRect& dst, |
218 const SkPaint* paint, DrawBitmapRectFlags fla
gs) { | 218 const SkPaint* paint, SK_VIRTUAL_CONSTRAINT_T
YPE) { |
219 AUTO_LUA("drawBitmapRect"); | 219 AUTO_LUA("drawBitmapRect"); |
220 if (paint) { | 220 if (paint) { |
221 lua.pushPaint(*paint, "paint"); | 221 lua.pushPaint(*paint, "paint"); |
222 } | 222 } |
223 } | 223 } |
224 | 224 |
225 void SkLuaCanvas::onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center
, const SkRect& dst, | 225 void SkLuaCanvas::onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center
, const SkRect& dst, |
226 const SkPaint* paint) { | 226 const SkPaint* paint) { |
227 AUTO_LUA("drawBitmapNine"); | 227 AUTO_LUA("drawBitmapNine"); |
228 if (paint) { | 228 if (paint) { |
229 lua.pushPaint(*paint, "paint"); | 229 lua.pushPaint(*paint, "paint"); |
230 } | 230 } |
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 |