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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 lua.pushRect(rect, "rect"); | 187 lua.pushRect(rect, "rect"); |
188 lua.pushPaint(paint, "paint"); | 188 lua.pushPaint(paint, "paint"); |
189 } | 189 } |
190 | 190 |
191 void SkLuaCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { | 191 void SkLuaCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { |
192 AUTO_LUA("drawRRect"); | 192 AUTO_LUA("drawRRect"); |
193 lua.pushRRect(rrect, "rrect"); | 193 lua.pushRRect(rrect, "rrect"); |
194 lua.pushPaint(paint, "paint"); | 194 lua.pushPaint(paint, "paint"); |
195 } | 195 } |
196 | 196 |
| 197 void SkLuaCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, |
| 198 const SkPaint& paint) { |
| 199 AUTO_LUA("drawDRRect"); |
| 200 lua.pushRRect(outer, "outer"); |
| 201 lua.pushRRect(inner, "inner"); |
| 202 lua.pushPaint(paint, "paint"); |
| 203 } |
| 204 |
197 void SkLuaCanvas::drawPath(const SkPath& path, const SkPaint& paint) { | 205 void SkLuaCanvas::drawPath(const SkPath& path, const SkPaint& paint) { |
198 AUTO_LUA("drawPath"); | 206 AUTO_LUA("drawPath"); |
199 lua.pushPath(path, "path"); | 207 lua.pushPath(path, "path"); |
200 lua.pushPaint(paint, "paint"); | 208 lua.pushPaint(paint, "paint"); |
201 } | 209 } |
202 | 210 |
203 void SkLuaCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, | 211 void SkLuaCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, |
204 const SkPaint* paint) { | 212 const SkPaint* paint) { |
205 AUTO_LUA("drawBitmap"); | 213 AUTO_LUA("drawBitmap"); |
206 if (paint) { | 214 if (paint) { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 const SkColor colors[], SkXfermode* xmode, | 283 const SkColor colors[], SkXfermode* xmode, |
276 const uint16_t indices[], int indexCount, | 284 const uint16_t indices[], int indexCount, |
277 const SkPaint& paint) { | 285 const SkPaint& paint) { |
278 AUTO_LUA("drawVertices"); | 286 AUTO_LUA("drawVertices"); |
279 lua.pushPaint(paint, "paint"); | 287 lua.pushPaint(paint, "paint"); |
280 } | 288 } |
281 | 289 |
282 void SkLuaCanvas::drawData(const void* data, size_t length) { | 290 void SkLuaCanvas::drawData(const void* data, size_t length) { |
283 AUTO_LUA("drawData"); | 291 AUTO_LUA("drawData"); |
284 } | 292 } |
OLD | NEW |