Lines Matching refs:get_ref
85 template <typename T> T* get_ref(lua_State* L, int index) { in get_ref() function
461 get_ref<SkCanvas>(L, 1)->clear(0); in lcanvas_clear()
466 get_ref<SkCanvas>(L, 1)->drawColor(lua2color(L, 2)); in lcanvas_drawColor()
471 get_ref<SkCanvas>(L, 1)->drawPaint(*get_obj<SkPaint>(L, 2)); in lcanvas_drawPaint()
479 get_ref<SkCanvas>(L, 1)->drawRect(rect, *paint); in lcanvas_drawRect()
485 get_ref<SkCanvas>(L, 1)->drawOval(*lua2rect(L, 2, &rect), in lcanvas_drawOval()
491 get_ref<SkCanvas>(L, 1)->drawCircle(lua2scalar(L, 2), in lcanvas_drawCircle()
513 SkCanvas* canvas = get_ref<SkCanvas>(L, 1); in lcanvas_drawImage()
514 SkImage* image = get_ref<SkImage>(L, 2); in lcanvas_drawImage()
527 SkCanvas* canvas = get_ref<SkCanvas>(L, 1); in lcanvas_drawImageRect()
528 SkImage* image = get_ref<SkImage>(L, 2); in lcanvas_drawImageRect()
567 get_ref<SkCanvas>(L, 1)->drawPatch(cubics, colors, texs, nullptr, *get_obj<SkPaint>(L, 5)); in lcanvas_drawPatch()
572 get_ref<SkCanvas>(L, 1)->drawPath(*get_obj<SkPath>(L, 2), in lcanvas_drawPath()
579 SkCanvas* canvas = get_ref<SkCanvas>(L, 1); in lcanvas_drawPicture()
580 SkPicture* picture = get_ref<SkPicture>(L, 2); in lcanvas_drawPicture()
601 get_ref<SkCanvas>(L, 1)->drawText(text, len, in lcanvas_drawText()
609 const SkTextBlob* blob = get_ref<SkTextBlob>(L, 2); in lcanvas_drawTextBlob()
613 get_ref<SkCanvas>(L, 1)->drawTextBlob(blob, x, y, paint); in lcanvas_drawTextBlob()
618 lua_pushnumber(L, get_ref<SkCanvas>(L, 1)->getSaveCount()); in lcanvas_getSaveCount()
623 SkLua(L).pushMatrix(get_ref<SkCanvas>(L, 1)->getTotalMatrix()); in lcanvas_getTotalMatrix()
628 SkLua(L).pushClipStack(*get_ref<SkCanvas>(L, 1)->getClipStack()); in lcanvas_getClipStack()
634 const SkCanvas* canvas = get_ref<SkCanvas>(L, 1); in lcanvas_getReducedClipStack()
669 lua_pushinteger(L, get_ref<SkCanvas>(L, 1)->save()); in lcanvas_save()
675 … lua_pushinteger(L, get_ref<SkCanvas>(L, 1)->saveLayer(nullptr, lua2OptionalPaint(L, 2, &paint))); in lcanvas_saveLayer()
680 get_ref<SkCanvas>(L, 1)->restore(); in lcanvas_restore()
687 get_ref<SkCanvas>(L, 1)->scale(sx, sy); in lcanvas_scale()
694 get_ref<SkCanvas>(L, 1)->translate(tx, ty); in lcanvas_translate()
700 get_ref<SkCanvas>(L, 1)->rotate(degrees); in lcanvas_rotate()
705 get_ref<SkCanvas>(L, 1)->concat(*get_obj<SkMatrix>(L, 2)); in lcanvas_concat()
713 SkSurface* surface = get_ref<SkCanvas>(L, 1)->newSurface(info); in lcanvas_newSurface()
723 get_ref<SkCanvas>(L, 1)->unref(); in lcanvas_gc()
765 push_ref(L, get_ref<SkDocument>(L, 1)->beginPage(lua2scalar(L, 2), in ldocument_beginPage()
772 get_ref<SkDocument>(L, 1)->endPage(); in ldocument_endPage()
777 get_ref<SkDocument>(L, 1)->close(); in ldocument_close()
782 get_ref<SkDocument>(L, 1)->unref(); in ldocument_gc()
922 get_obj<SkPaint>(L, 1)->setTypeface(get_ref<SkTypeface>(L, 2)); in lpaint_setTypeface()
1095 paint->setXfermode(get_ref<SkXfermode>(L, 2)); in lpaint_setXfermode()
1111 paint->setColorFilter(get_ref<SkColorFilter>(L, 2)); in lpaint_setColorFilter()
1127 paint->setImageFilter(get_ref<SkImageFilter>(L, 2)); in lpaint_setImageFilter()
1143 paint->setShader(get_ref<SkShader>(L, 2)); in lpaint_setShader()
1236 SkShader* shader = get_ref<SkShader>(L, 1); in lshader_isOpaque()
1241 SkShader* shader = get_ref<SkShader>(L, 1); in lshader_isABitmap()
1260 SkShader* shader = get_ref<SkShader>(L, 1); in lshader_asAGradient()
1291 get_ref<SkShader>(L, 1)->unref(); in lshader_gc()
1306 SkPathEffect* pe = get_ref<SkPathEffect>(L, 1); in lpatheffect_asADash()
1322 get_ref<SkPathEffect>(L, 1)->unref(); in lpatheffect_gc()
1335 lua_pushstring(L, get_ref<SkXfermode>(L, 1)->getTypeName()); in lpxfermode_getTypeName()
1340 get_ref<SkXfermode>(L, 1)->unref(); in lpxfermode_gc()
1353 get_ref<SkColorFilter>(L, 1)->unref(); in lpcolorfilter_gc()
1365 get_ref<SkImageFilter>(L, 1)->unref(); in lpimagefilter_gc()
1696 lua_pushinteger(L, get_ref<SkImage>(L, 1)->width()); in limage_width()
1701 lua_pushinteger(L, get_ref<SkImage>(L, 1)->height()); in limage_height()
1708 SkAutoTUnref<SkShader> shader(get_ref<SkImage>(L, 1)->newShader(tmode, tmode, localM)); in limage_newShader()
1714 get_ref<SkImage>(L, 1)->unref(); in limage_gc()
1729 lua_pushinteger(L, get_ref<SkSurface>(L, 1)->width()); in lsurface_width()
1734 lua_pushinteger(L, get_ref<SkSurface>(L, 1)->height()); in lsurface_height()
1739 SkCanvas* canvas = get_ref<SkSurface>(L, 1)->getCanvas(); in lsurface_getCanvas()
1754 SkImage* image = get_ref<SkSurface>(L, 1)->newImageSnapshot(); in lsurface_newImageSnapshot()
1767 SkSurface* surface = get_ref<SkSurface>(L, 1)->newSurface(info); in lsurface_newSurface()
1777 get_ref<SkSurface>(L, 1)->unref(); in lsurface_gc()
1847 lua_pushnumber(L, get_ref<SkPicture>(L, 1)->cullRect().width()); in lpicture_width()
1852 lua_pushnumber(L, get_ref<SkPicture>(L, 1)->cullRect().height()); in lpicture_height()
1857 get_ref<SkPicture>(L, 1)->unref(); in lpicture_gc()
1871 SkLua(L).pushRect(get_ref<SkTextBlob>(L, 1)->bounds()); in ltextblob_bounds()
1876 SkSafeUnref(get_ref<SkTextBlob>(L, 1)); in ltextblob_gc()
1890 get_ref<SkTypeface>(L, 1)->getFamilyName(&str); in ltypeface_getFamilyName()
1896 lua_pushnumber(L, (double)get_ref<SkTypeface>(L, 1)->style()); in ltypeface_getStyle()
1901 SkSafeUnref(get_ref<SkTypeface>(L, 1)); in ltypeface_gc()