本文整理汇总了C++中DisplayListRenderer::drawPatch方法的典型用法代码示例。如果您正苦于以下问题:C++ DisplayListRenderer::drawPatch方法的具体用法?C++ DisplayListRenderer::drawPatch怎么用?C++ DisplayListRenderer::drawPatch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DisplayListRenderer
的用法示例。
在下文中一共展示了DisplayListRenderer::drawPatch方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
static void android_view_GLES20Canvas_drawPatch(JNIEnv* env, jobject clazz,
jlong rendererPtr, jlong bitmapPtr, jlong patchPtr,
float left, float top, float right, float bottom, jlong paintPtr) {
SkBitmap* bitmap = reinterpret_cast<SkBitmap*>(bitmapPtr);
DisplayListRenderer* renderer = reinterpret_cast<DisplayListRenderer*>(rendererPtr);
Res_png_9patch* patch = reinterpret_cast<Res_png_9patch*>(patchPtr);
Paint* paint = reinterpret_cast<Paint*>(paintPtr);
renderer->drawPatch(bitmap, patch, left, top, right, bottom, paint);
}
示例2: bitmapRef
static void android_view_GLES20Canvas_drawPatch(JNIEnv* env, jobject clazz,
jlong rendererPtr, jlong bitmapPtr, jbyteArray buffer, jlong patchPtr,
float left, float top, float right, float bottom, jlong paintPtr) {
SkBitmap* bitmap = reinterpret_cast<SkBitmap*>(bitmapPtr);
// This object allows the renderer to allocate a global JNI ref to the buffer object.
JavaHeapBitmapRef bitmapRef(env, bitmap, buffer);
DisplayListRenderer* renderer = reinterpret_cast<DisplayListRenderer*>(rendererPtr);
Res_png_9patch* patch = reinterpret_cast<Res_png_9patch*>(patchPtr);
Paint* paint = reinterpret_cast<Paint*>(paintPtr);
renderer->drawPatch(bitmap, patch, left, top, right, bottom, paint);
}