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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 } | 161 } |
162 | 162 |
163 void SkLuaCanvas::drawPaint(const SkPaint& paint) { | 163 void SkLuaCanvas::drawPaint(const SkPaint& paint) { |
164 AUTO_LUA("drawPaint"); | 164 AUTO_LUA("drawPaint"); |
165 lua.pushPaint(paint, "paint"); | 165 lua.pushPaint(paint, "paint"); |
166 } | 166 } |
167 | 167 |
168 void SkLuaCanvas::drawPoints(PointMode mode, size_t count, | 168 void SkLuaCanvas::drawPoints(PointMode mode, size_t count, |
169 const SkPoint pts[], const SkPaint& paint) { | 169 const SkPoint pts[], const SkPaint& paint) { |
170 AUTO_LUA("drawPoints"); | 170 AUTO_LUA("drawPoints"); |
171 lua.pushArrayPoint(pts, count, "points"); | 171 lua.pushArrayPoint(pts, SkToInt(count), "points"); |
172 lua.pushPaint(paint, "paint"); | 172 lua.pushPaint(paint, "paint"); |
173 } | 173 } |
174 | 174 |
175 void SkLuaCanvas::drawOval(const SkRect& rect, const SkPaint& paint) { | 175 void SkLuaCanvas::drawOval(const SkRect& rect, const SkPaint& paint) { |
176 AUTO_LUA("drawOval"); | 176 AUTO_LUA("drawOval"); |
177 lua.pushRect(rect, "rect"); | 177 lua.pushRect(rect, "rect"); |
178 lua.pushPaint(paint, "paint"); | 178 lua.pushPaint(paint, "paint"); |
179 } | 179 } |
180 | 180 |
181 void SkLuaCanvas::drawRect(const SkRect& rect, const SkPaint& paint) { | 181 void SkLuaCanvas::drawRect(const SkRect& rect, const SkPaint& paint) { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 const SkColor colors[], SkXfermode* xmode, | 279 const SkColor colors[], SkXfermode* xmode, |
280 const uint16_t indices[], int indexCount, | 280 const uint16_t indices[], int indexCount, |
281 const SkPaint& paint) { | 281 const SkPaint& paint) { |
282 AUTO_LUA("drawVertices"); | 282 AUTO_LUA("drawVertices"); |
283 lua.pushPaint(paint, "paint"); | 283 lua.pushPaint(paint, "paint"); |
284 } | 284 } |
285 | 285 |
286 void SkLuaCanvas::drawData(const void* data, size_t length) { | 286 void SkLuaCanvas::drawData(const void* data, size_t length) { |
287 AUTO_LUA("drawData"); | 287 AUTO_LUA("drawData"); |
288 } | 288 } |
OLD | NEW |