| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 lua.pushArrayPoint(pts, SkToInt(count), "points"); | 172 lua.pushArrayPoint(pts, SkToInt(count), "points"); |
| 173 lua.pushPaint(paint, "paint"); | 173 lua.pushPaint(paint, "paint"); |
| 174 } | 174 } |
| 175 | 175 |
| 176 void SkLuaCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) { | 176 void SkLuaCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) { |
| 177 AUTO_LUA("drawOval"); | 177 AUTO_LUA("drawOval"); |
| 178 lua.pushRect(rect, "rect"); | 178 lua.pushRect(rect, "rect"); |
| 179 lua.pushPaint(paint, "paint"); | 179 lua.pushPaint(paint, "paint"); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void SkLuaCanvas::onDrawArc(const SkRect& rect, SkScalar startAngle, SkScalar sw
eepAngle, |
| 183 bool useCenter, const SkPaint& paint) { |
| 184 AUTO_LUA("drawArc"); |
| 185 lua.pushRect(rect, "rect"); |
| 186 lua.pushScalar(startAngle, "startAngle"); |
| 187 lua.pushScalar(sweepAngle, "sweepAngle"); |
| 188 lua.pushBool(useCenter, "useCenter"); |
| 189 lua.pushPaint(paint, "paint"); |
| 190 } |
| 191 |
| 182 void SkLuaCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) { | 192 void SkLuaCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) { |
| 183 AUTO_LUA("drawRect"); | 193 AUTO_LUA("drawRect"); |
| 184 lua.pushRect(rect, "rect"); | 194 lua.pushRect(rect, "rect"); |
| 185 lua.pushPaint(paint, "paint"); | 195 lua.pushPaint(paint, "paint"); |
| 186 } | 196 } |
| 187 | 197 |
| 188 void SkLuaCanvas::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) { | 198 void SkLuaCanvas::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) { |
| 189 AUTO_LUA("drawRRect"); | 199 AUTO_LUA("drawRRect"); |
| 190 lua.pushRRect(rrect, "rrect"); | 200 lua.pushRRect(rrect, "rrect"); |
| 191 lua.pushPaint(paint, "paint"); | 201 lua.pushPaint(paint, "paint"); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 } | 308 } |
| 299 | 309 |
| 300 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount, | 310 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount, |
| 301 const SkPoint vertices[], const SkPoint texs[], | 311 const SkPoint vertices[], const SkPoint texs[], |
| 302 const SkColor colors[], SkXfermode* xmode, | 312 const SkColor colors[], SkXfermode* xmode, |
| 303 const uint16_t indices[], int indexCount, | 313 const uint16_t indices[], int indexCount, |
| 304 const SkPaint& paint) { | 314 const SkPaint& paint) { |
| 305 AUTO_LUA("drawVertices"); | 315 AUTO_LUA("drawVertices"); |
| 306 lua.pushPaint(paint, "paint"); | 316 lua.pushPaint(paint, "paint"); |
| 307 } | 317 } |
| OLD | NEW |