< prev index next >

modules/graphics/src/main/native-font/coretext.c

Print this page

        

@@ -362,10 +362,28 @@
 fail:
     if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
     return rc;
 }
 
+JNIEXPORT void JNICALL OS_NATIVE(CFRelease)
+    (JNIEnv *env, jclass that, jlong arg0)
+{
+    CFRelease((CFTypeRef)arg0);
+}
+
+JNIEXPORT jlong JNICALL OS_NATIVE(CTFontCreateWithGraphicsFont)
+    (JNIEnv *env, jclass that, jlong cgFont, jdouble size, jobject matrix, jlong attributes)
+{
+    CGAffineTransform transform;
+    if (matrix) {
+        getCGAffineTransformFields(env, matrix, &transform);
+    } else {
+        transform = CGAffineTransformIdentity;
+    }
+    return (jlong)CTFontCreateWithGraphicsFont((CGFontRef)cgFont, (CGFloat)size, &transform, (CTFontDescriptorRef)attributes);
+}
+
 JNIEXPORT jlong JNICALL OS_NATIVE(CTFontCreateWithName)
     (JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jobject arg2)
 {
     CGAffineTransform _arg2, *lparg2=NULL;
     jlong rc = 0;

@@ -375,16 +393,10 @@
     /* In only */
 //    if (arg2 && lparg2) setCGAffineTransformFields(env, arg2, lparg2);
     return rc;
 }
 
-JNIEXPORT void JNICALL OS_NATIVE(CFRelease)
-    (JNIEnv *env, jclass that, jlong arg0)
-{
-    CFRelease((CFTypeRef)arg0);
-}
-
 JNIEXPORT jlong JNICALL OS_NATIVE(CFURLCreateWithFileSystemPath)
     (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jboolean arg3)
 {
     return (jlong)CFURLCreateWithFileSystemPath((CFAllocatorRef)arg0, (CFStringRef)arg1, (CFURLPathStyle)arg2, (Boolean)arg3);
 }

@@ -406,10 +418,16 @@
     /* In Only */
 //    if (arg2 && lparg2) setCGAffineTransformFields(env, arg2, lparg2);
     return rc;
 }
 
+JNIEXPORT jlong JNICALL OS_NATIVE(CGFontCreateWithDataProvider)
+    (JNIEnv *env, jclass that, jlong dataProvider)
+{
+    return (jlong)CGFontCreateWithDataProvider((CGDataProviderRef)dataProvider);
+}
+
 JNIEXPORT void JNICALL OS_NATIVE(CGPathRelease)
     (JNIEnv *env, jclass that, jlong arg0)
 {
     CGPathRelease((CGPathRef)arg0);
 }

@@ -487,10 +505,15 @@
     (JNIEnv *env, jclass that, jlong arg0)
 {
     CGColorSpaceRelease((CGColorSpaceRef)arg0);
 }
 
+JNIEXPORT jlong JNICALL OS_NATIVE(CGDataProviderCreateWithURL)
+    (JNIEnv *env, jclass that, jlong cfURL) {
+      return (jlong)CGDataProviderCreateWithURL((CFURLRef)cfURL);
+}
+
 JNIEXPORT jlong JNICALL OS_NATIVE(kCFTypeDictionaryKeyCallBacks)
     (JNIEnv *env, jclass that)
 {
     return (jlong)&kCFTypeDictionaryKeyCallBacks;
 }
< prev index next >