Lines Matching full:region
42 static void Region_destructor(JNIEnv* env, jobject, SkRegion* region) {
43 SkASSERT(region);
44 delete region;
62 static jboolean Region_getBounds(JNIEnv* env, jobject, SkRegion* region, jobject rectBounds) {
63 GraphicsJNI::irect_to_jrect(region->getBounds(), env, rectBounds);
64 return !region->isEmpty();
67 static jboolean Region_getBoundaryPath(JNIEnv* env, jobject, const SkRegion* region, SkPath* path) {
68 return region->getBoundaryPath(path);
78 static jboolean Region_op1(JNIEnv* env, jobject, SkRegion* dst, jobject rectObject, const SkRegion* region, int op) {
81 return dst->op(ir, *region, (SkRegion::Op)op);
90 static jboolean Region_isEmpty(JNIEnv* env, jobject region) {
91 return GetSkRegion(env, region)->isEmpty();
94 static jboolean Region_isRect(JNIEnv* env, jobject region) {
95 return GetSkRegion(env, region)->isRect();
98 static jboolean Region_isComplex(JNIEnv* env, jobject region) {
99 return GetSkRegion(env, region)->isComplex();
102 static jboolean Region_contains(JNIEnv* env, jobject region, int x, int y) {
103 return GetSkRegion(env, region)->contains(x, y);
106 static jboolean Region_quickContains(JNIEnv* env, jobject region, int left, int top, int right, int bottom) {
107 return GetSkRegion(env, region)->quickContains(left, top, right, bottom);
110 static jboolean Region_quickRejectIIII(JNIEnv* env, jobject region, int left, int top, int right, int bottom) {
113 return GetSkRegion(env, region)->quickReject(ir);
116 static jboolean Region_quickRejectRgn(JNIEnv* env, jobject region, jobject other) {
117 return GetSkRegion(env, region)->quickReject(*GetSkRegion(env, other));
120 static void Region_translate(JNIEnv* env, jobject region, int x, int y, jobject dst) {
121 SkRegion* rgn = GetSkRegion(env, region);
136 // Scale the region by given scale and set the reuslt to the dst.
137 // dest and src can be the same region instance.
150 static void Region_scale(JNIEnv* env, jobject region, jfloat scale, jobject dst) {
151 SkRegion* rgn = GetSkRegion(env, region);
158 static jstring Region_toString(JNIEnv* env, jobject clazz, SkRegion* region) {
159 char* str = region->toString();
178 SkRegion* region = new SkRegion;
180 region->readFromMemory(p->readInplace(size));
182 return region;
185 static jboolean Region_writeToParcel(JNIEnv* env, jobject clazz, const SkRegion* region, jobject parcel)
193 size_t size = region->writeToMemory(NULL);
195 region->writeToMemory(p->writeInplace(size));
210 SkRegion fRgn; // a copy of the caller's region
220 static RgnIterPair* RegionIter_constructor(JNIEnv* env, jobject, const SkRegion* region)
222 SkASSERT(region);
223 return new RgnIterPair(*region);
266 // these are methods that take the java region object
273 { "quickReject", "(Landroid/graphics/Region;)Z", (void*)Region_quickRejectRgn },
274 { "scale", "(FLandroid/graphics/Region;)V", (void*)Region_scale },
275 { "translate", "(IILandroid/graphics/Region;)V", (void*)Region_translate },
285 jclass clazz = env->FindClass("android/graphics/Region");
291 int result = android::AndroidRuntime::registerNativeMethods(env, "android/graphics/Region",