[cairo-commit] cairo-java/src/jni
org_freedesktop_cairo_PngSurface.c, 1.7,
1.8 org_freedesktop_cairo_ScaledFont.c, NONE,
1.1 org_freedesktop_cairo_FontFace.c, 1.1, 1.2
Jeffrey Morgan
commit at pdx.freedesktop.org
Sat Apr 23 12:25:58 PDT 2005
- Previous message: [cairo-commit]
cairo-java/src/java/org/freedesktop/cairo Cairo.java, 1.15,
1.16 TextExtents.java, 1.4, 1.5 ScaledFont.java, NONE,
1.1 Glyph.java, 1.3, 1.4 FontFace.java, 1.1, 1.2
- Next message: [cairo-commit] cairo-java ChangeLog,1.41,1.42 Makefile.am,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: kuzman
Update of /cvs/cairo/cairo-java/src/jni
In directory gabe:/tmp/cvs-serv7968/src/jni
Modified Files:
org_freedesktop_cairo_PngSurface.c
org_freedesktop_cairo_FontFace.c
Added Files:
org_freedesktop_cairo_ScaledFont.c
Log Message:
updated FontFace and added ScaledFont
Index: org_freedesktop_cairo_PngSurface.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_PngSurface.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- org_freedesktop_cairo_PngSurface.c 23 Apr 2005 16:48:28 -0000 1.7
+++ org_freedesktop_cairo_PngSurface.c 23 Apr 2005 19:25:56 -0000 1.8
@@ -7,8 +7,6 @@
* the terms of the GNU Library General Public License version 2.
*/
-#include <stdio.h>
-#include <stdlib.h>
#include <jni.h>
#include <cairo.h>
#include <jg_jnu.h>
--- NEW FILE: org_freedesktop_cairo_ScaledFont.c ---
/*
* Java-Gnome Bindings Library
*
* Copyright 1998-2005 the Java-Gnome Team, all rights reserved.
*
* The Java-Gnome bindings library is free software distributed under
* the terms of the GNU Library General Public License version 2.
*/
#include <jni.h>
#include <cairo.h>
#include <jg_jnu.h>
#ifndef _Included_org_freedesktop_cairo_ScaledFont
#define _Included_org_freedesktop_cairo_ScaledFont
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: org_freedesktop_cairo_ScaledFont
* Method: cairo_scaled_font_create
* Signature: (Lorg/gnu/javagnome/Handle;Lorg/gnu/javagnome/Handle;Lorg/gnu/javagnome/Handle;)Lorg/gnu/javagnome/Handle;
*/
JNIEXPORT jobject JNICALL Java_org_freedesktop_cairo_ScaledFont_cairo_1scaled_1font_1create
(JNIEnv *env, jclass cls, jobject face, jobject matrix, jobject ctm)
{
cairo_font_face_t *face_g = (cairo_font_face_t*)getPointerFromHandle(env, face);
cairo_matrix_t *matrix_g = (cairo_matrix_t*)getPointerFromHandle(env, matrix);
cairo_matrix_t *ctm_g = (cairo_matrix_t*)getPointerFromHandle(env, ctm);
return getHandleFromPointer(env,
cairo_scaled_font_create(face_g, matrix_g, ctm_g));
}
/*
* Class: org_freedesktop_cairo_ScaledFont
* Method: cairo_scaled_font_extents
* Signature: (Lorg/gnu/javagnome/Handle;Lorg/gnu/javagnome/Handle;)I
*/
JNIEXPORT jint JNICALL Java_org_freedesktop_cairo_ScaledFont_cairo_1scaled_1font_1extents
(JNIEnv *env, jclass cls, jobject sfont, jobject ext)
{
cairo_scaled_font_t *sfont_g = (cairo_scaled_font_t*)getPointerFromHandle(env, sfont);
cairo_font_extents_t* ext_g;
int status = cairo_scaled_font_extents(sfont_g, ext_g);
updateHandle(env, ext, ext_g);
return status;
}
#ifdef __cplusplus
}
#endif
#endif
Index: org_freedesktop_cairo_FontFace.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_FontFace.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- org_freedesktop_cairo_FontFace.c 11 Apr 2005 00:47:22 -0000 1.1
+++ org_freedesktop_cairo_FontFace.c 23 Apr 2005 19:25:56 -0000 1.2
@@ -16,6 +16,7 @@
#ifdef __cplusplus
extern "C" {
#endif
+
/*
* Class: org_freedesktop_cairo_FontFace
* Method: cairo_font_face_reference
@@ -40,38 +41,6 @@
cairo_font_face_destroy(font);
}
-///*
-// * Class: org_freedesktop_cairo_FontFace
-// * Method: cairo_font_extents
-// * Signature: (Lorg/gnu/glib/Handle;Lorg/gnu/glib/Handle;Lorg/gnu/glib/Handle;)I
-// */
-//JNIEXPORT jint JNICALL Java_org_freedesktop_cairo_FontFace_cairo_1font_1extents
-// (JNIEnv *env, jclass cls, jobject obj, jobject matrix, jobject extents)
-//{
-// cairo_font_t *font = (cairo_font_t*)getPointerFromHandle(env, obj);
-// cairo_matrix_t *matrix_g = (cairo_matrix_t*)getPointerFromHandle(env, matrix);
-// cairo_font_extents_t *extents_g = (cairo_font_extents_t*)getPointerFromHandle(env, extents);
-// int status = cairo_font_extents(font, matrix_g, extents_g);
-// updateHandle(env, extents, extents_g);
-// return status;
-//}
-//
-///*
-// * Class: org_freedesktop_cairo_FontFace
-// * Method: cairo_font_glyph_extents
-// * Signature: (Lorg/gnu/glib/Handle;Lorg/gnu/glib/Handle;[Lorg/gnu/glib/Handle;Lorg/gnu/glib/Handle;)V
-// */
-//JNIEXPORT void JNICALL Java_org_freedesktop_cairo_FontFace_cairo_1font_1glyph_1extents
-// (JNIEnv *env, jclass cls, jobject obj, jobject matrix, jobjectArray glyphs, jobject extents)
-//{
-// cairo_font_t *font = (cairo_font_t*)getPointerFromHandle(env, obj);
-// cairo_matrix_t *matrix_g = (cairo_matrix_t*)getPointerFromHandle(env, matrix);
-// cairo_glyph_t *glyphs_g = (cairo_glyph_t*)getPointerArrayFromHandles(env, glyphs);
-// cairo_text_extents_t *extents_g = (cairo_text_extents_t*)getPointerFromHandle(env, extents);
-// int len = (*env)->GetArrayLength(env, glyphs);
-// cairo_font_glyph_extents(font, matrix_g, glyphs_g, len, extents_g);
-// updateHandle(env, extents, extents_g);
-//}
#ifdef __cplusplus
}
- Previous message: [cairo-commit]
cairo-java/src/java/org/freedesktop/cairo Cairo.java, 1.15,
1.16 TextExtents.java, 1.4, 1.5 ScaledFont.java, NONE,
1.1 Glyph.java, 1.3, 1.4 FontFace.java, 1.1, 1.2
- Next message: [cairo-commit] cairo-java ChangeLog,1.41,1.42 Makefile.am,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list