[cairo-commit] CairoJava/jni Cairo.cpp, 1.3, 1.4 CairoException.cpp, 1.4, 1.5 CairoFont.cpp, 1.3, 1.4 CairoFreetypeFont.cpp, 1.3, 1.4 CairoGlitzSurface.cpp, 1.8, 1.9 CairoImageBufferSurface.cpp, 1.3, 1.4 CairoLinearPattern.cpp, 1.3, 1.4 CairoMatrix.cpp, 1.3, 1.4 CairoPattern.cpp, 1.3, 1.4 CairoRadialPattern.cpp, 1.3, 1.4 CairoSWTSurface.cpp, 1.4, 1.5 CairoSurface.cpp, 1.3, 1.4 CairoSurfacePattern.cpp, 1.3, 1.4 utils.h, 1.4, 1.5

Charles Tuckey commit at pdx.freedesktop.org
Mon Nov 8 09:52:59 PST 2004


Committed by: ctuckey

Update of /cvs/cairo/CairoJava/jni
In directory gabe:/tmp/cvs-serv7380/jni

Modified Files:
	Cairo.cpp CairoException.cpp CairoFont.cpp 
	CairoFreetypeFont.cpp CairoGlitzSurface.cpp 
	CairoImageBufferSurface.cpp CairoLinearPattern.cpp 
	CairoMatrix.cpp CairoPattern.cpp CairoRadialPattern.cpp 
	CairoSWTSurface.cpp CairoSurface.cpp CairoSurfacePattern.cpp 
	utils.h 
Log Message:
Added CAIROJAVA_TRACE statements.
Renamed xr references to cr.
Added break statements to switch in CairoException.cpp.


Index: Cairo.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/Cairo.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Cairo.cpp	27 Oct 2004 03:45:37 -0000	1.3
+++ Cairo.cpp	8 Nov 2004 17:52:57 -0000	1.4
@@ -83,7 +83,7 @@
 
 This is adapted from svg-path in Gill.
 */
-static void _svg_path_arc_segment (cairo_t *xrs,
+static void _svg_path_arc_segment (cairo_t *cr,
                                    double xc, double yc,
                                    double th0, double th1,
                                    double rx, double ry,
@@ -111,7 +111,14 @@
     y3 = yc + sin (th1);
     x2 = x3 + t * sin (th1);
[...1236 lines suppressed...]
 {
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrixp), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_current_matrix (%p, " CAIROJAVA_TRACE_MATRIX_FPRINTF_STR ")\n", TO_PTR(cairo_t, crp), 
+            TO_PTR(cairo_matrix_t, matrixp), a, b, c, d, tx, ty);
+#endif
     cairo_current_matrix(TO_PTR(cairo_t, crp), TO_PTR(cairo_matrix_t, matrixp));
 }
 
@@ -1207,6 +1509,9 @@
 JNIEXPORT jlong JNICALL Java_org_cairographics_cairo_Cairo_cairo_1current_1target_1surface
 (JNIEnv *env, jclass me, jlong crp)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_current_target_surface (%p)\n", TO_PTR(cairo_t, crp));
+#endif
     return TO_LONG(cairo_current_target_surface(TO_PTR(cairo_t, crp)));
 }
 

Index: CairoException.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoException.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CairoException.cpp	27 Oct 2004 03:45:37 -0000	1.4
+++ CairoException.cpp	8 Nov 2004 17:52:57 -0000	1.5
@@ -60,20 +60,28 @@
     switch (status) {
         case CAIRO_STATUS_SUCCESS:
             msg = "success";
+            break;
         case CAIRO_STATUS_NO_MEMORY:
             msg = "out of memory";
+            break;
         case CAIRO_STATUS_INVALID_RESTORE:
-	msg = "cairo_restore without matching cairo_save";
+            msg = "cairo_restore without matching cairo_save";
+            break;
         case CAIRO_STATUS_INVALID_POP_GROUP:
             msg = "cairo_pop_group without matching cairo_push_group";
+            break;
         case CAIRO_STATUS_NO_CURRENT_POINT:
             msg = "no current point defined";
+            break;
         case CAIRO_STATUS_INVALID_MATRIX:
             msg = "invalid matrix (not invertible)";
+            break;
         case CAIRO_STATUS_NO_TARGET_SURFACE:
             msg = "no target surface has been set";
+            break;
         case CAIRO_STATUS_NULL_POINTER:
             msg = "NULL pointer";
+            break;
     }
 
     return env->NewStringUTF(msg);

Index: CairoFont.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoFont.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoFont.cpp	27 Oct 2004 03:45:37 -0000	1.3
+++ CairoFont.cpp	8 Nov 2004 17:52:57 -0000	1.4
@@ -58,6 +58,9 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoFont_cairo_1font_1reference
 (JNIEnv *env, jclass me, jlong fontp) 
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_font_reference (%p)\n", TO_PTR(cairo_font_t, fontp));
+#endif
     cairo_font_reference(TO_PTR(cairo_font_t, fontp));
 }
 
@@ -69,6 +72,9 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoFont_cairo_1font_1destroy
   (JNIEnv *env, jclass me, jlong fontp)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_font_destroy (%p)\n", TO_PTR(cairo_font_t, fontp));
+#endif
     cairo_font_destroy(TO_PTR(cairo_font_t, fontp));
 }
 
@@ -80,6 +86,12 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoFont_cairo_1font_1set_1transform
 (JNIEnv *env, jclass me, jlong fontp, jlong matrixp)
 {
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrixp), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_font_set_transform (%p, " CAIROJAVA_TRACE_MATRIX_FPRINTF_STR ")\n", TO_PTR(cairo_font_t, fontp), 
+            TO_PTR(cairo_matrix_t, matrixp), a, b, c, d, tx, ty);
+#endif
     cairo_font_set_transform(TO_PTR(cairo_font_t, fontp),
                              TO_PTR(cairo_matrix_t, matrixp));
 }
@@ -92,6 +104,12 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoFont_cairo_1font_1current_1transform
 (JNIEnv *env, jclass me, jlong fontp, jlong matrixp)
 {
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrixp), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_font_current_transform (%p, " CAIROJAVA_TRACE_MATRIX_FPRINTF_STR ")\n", TO_PTR(cairo_font_t, fontp), 
+            TO_PTR(cairo_matrix_t, matrixp), a, b, c, d, tx, ty);
+#endif
     cairo_font_current_transform(TO_PTR(cairo_font_t, fontp),
                                  TO_PTR(cairo_matrix_t, matrixp));
 }

Index: CairoFreetypeFont.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoFreetypeFont.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoFreetypeFont.cpp	27 Oct 2004 03:45:37 -0000	1.3
+++ CairoFreetypeFont.cpp	8 Nov 2004 17:52:57 -0000	1.4
@@ -89,7 +89,7 @@
         fcslant = FC_SLANT_ITALIC;
         break;
     case CAIRO_FONT_SLANT_OBLIQUE:
-	fcslant = FC_SLANT_OBLIQUE;
+	    fcslant = FC_SLANT_OBLIQUE;
         break;
     case CAIRO_FONT_SLANT_NORMAL:
     default:
@@ -110,6 +110,9 @@
         ft_lib_init = 1;
     }
 
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_ft_font_create (%p, %p)\n", ft_library, pat);
+#endif
     font = cairo_ft_font_create (ft_library, pat);
     if (font == NULL)
 	return 0;
@@ -136,8 +139,11 @@
 (JNIEnv *env, jclass me, jstring family, jstring slant, jstring weight)
 {
     const char *family_utf = env->GetStringUTFChars(family, NULL);
+    fprintf(stderr, "family_utf: %s\n", family_utf);
     const char *slant_utf =  env->GetStringUTFChars(slant, NULL);
+    fprintf(stderr, "slant_utf: %s\n", slant_utf);
     const char *weight_utf =  env->GetStringUTFChars(weight, NULL);
+    fprintf(stderr, "weight_utf: %s\n", weight_utf);
     cairo_font_t *font = NULL;
     FcPattern * pat = NULL;
     FT_Error error;
@@ -163,6 +169,9 @@
         ft_lib_init = 1;
     }
 
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_ft_font_create (%p, %p)\n", ft_library, pat);
+#endif
     font = cairo_ft_font_create (ft_library, pat);
     if (font == NULL)
 	return 0;

Index: CairoGlitzSurface.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoGlitzSurface.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- CairoGlitzSurface.cpp	27 Oct 2004 03:45:37 -0000	1.8
+++ CairoGlitzSurface.cpp	8 Nov 2004 17:52:57 -0000	1.9
@@ -83,6 +83,10 @@
 {
 
 #ifdef CAIRO_HAS_GL_SURFACE
+#   ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_set_target_gl (%p, %p)\n",  TO_PTR (cairo_t, crp), TO_PTR (glitz_surface_t, sfp));
+#   endif
+
     cairo_set_target_gl (TO_PTR (cairo_t, crp), TO_PTR (glitz_surface_t, sfp));
 #else
     throw_surface_not_supported_exception (env, "glitz");
@@ -110,22 +114,48 @@
         exit (1);
     }
 
+    unsigned long format_options = 0;
+    format_options |= GLITZ_FORMAT_OPTION_DOUBLEBUFFER_MASK;
+    format_options |= GLITZ_FORMAT_OPTION_ONSCREEN_MASK;
+    format_options |= GLITZ_FORMAT_OPTION_NO_MULTISAMPLE_MASK;
+
+#   ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "glitz_glx_find_standard_format (%p, %d, %#lx, %#x)\n",  
+                     dpy, 
+                     DefaultScreen (dpy),
+                     format_options,
+                     GLITZ_STANDARD_RGB24);
+#   endif
     glitz_format_t *format = glitz_glx_find_standard_format (dpy, DefaultScreen (dpy),
-                                                             GLITZ_FORMAT_OPTION_ONSCREEN_MASK,
+                                                             format_options,
                                                              GLITZ_STANDARD_RGB24);
+                                                             
     if (!format) {
         fprintf (stderr, "Couldn't find a usable GLITZ format\n");
         exit (1);
     }
   
     Window win = GDK_WINDOW_XID (widget->window);
+#   ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "glitz_glx_surface_create_for_window (%p, %d, %p, %#lx)\n",  
+                     dpy, 
+                     DefaultScreen (dpy),
+                     format,
+                     win);
+#   endif
     glitz_surface_t *glitz_surface =
         glitz_glx_surface_create_for_window (dpy, DefaultScreen (dpy), format, win);
     if (!glitz_surface) {
         printf ("failed to create glitz surface\n");
         exit (1);
     }
-  
+#   ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "glitz_surface_set_polyedge (%p, %#x)\n",  
+                     glitz_surface, 
+                     GLITZ_POLYEDGE_SHARP);
+#   endif
+    glitz_surface_set_polyedge (glitz_surface, GLITZ_POLYEDGE_SHARP);
+    
     return TO_LONG (glitz_surface);
 #else
     throw_surface_not_supported_exception (env, "glitz");
@@ -144,6 +174,9 @@
 {
 
 #ifdef CAIRO_HAS_GL_SURFACE
+#   ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "glitz_surface_flush (%p)\n", TO_PTR (glitz_surface_t, glitz_surfacep));
+#   endif
     glitz_surface_flush (TO_PTR (glitz_surface_t, glitz_surfacep));
 #else
     throw_surface_not_supported_exception (env, "glitz");
@@ -161,6 +194,9 @@
 {
 
 #ifdef CAIRO_HAS_GL_SURFACE
+#   ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "glitz_surface_swap_buffers (%p)\n", TO_PTR (glitz_surface_t, glitz_surfacep));
+#   endif
     glitz_surface_swap_buffers (TO_PTR (glitz_surface_t, glitz_surfacep));
 #else
     throw_surface_not_supported_exception (env, "glitz");
@@ -178,6 +214,10 @@
 {
 
 #ifdef CAIRO_HAS_GL_SURFACE
+#   ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "glitz_surface_set_read_buffer (%p, %d)\n", 
+                    TO_PTR (glitz_surface_t, glitz_surfacep), to_glitz_buffer_t (buffer));
+#   endif
     glitz_surface_set_read_buffer (TO_PTR (glitz_surface_t, glitz_surfacep), 
                                    to_glitz_buffer_t (buffer));
 #else
@@ -196,6 +236,10 @@
 {
 
 #ifdef CAIRO_HAS_GL_SURFACE
+#   ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "glitz_surface_set_draw_buffer (%p, %d)\n", 
+                    TO_PTR (glitz_surface_t, glitz_surfacep), to_glitz_buffer_t (buffer));
+#   endif
     glitz_surface_set_draw_buffer (TO_PTR (glitz_surface_t, glitz_surfacep), 
                                    to_glitz_buffer_t (buffer));
 #else
@@ -216,6 +260,14 @@
                  jint x_dst, jint y_dst) {
 
 #ifdef CAIRO_HAS_GL_SURFACE
+#   ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "glitz_copy_area (%p, %p, %d, %d, %d, %d, %d, %d)\n", 
+                    TO_PTR (glitz_surface_t, glitz_surface_srcp), 
+                     TO_PTR (glitz_surface_t, glitz_surface_destp), 
+                     x_src, y_src, 
+                     width, height, 
+                     x_dst, y_dst);
+#   endif
     glitz_copy_area (TO_PTR (glitz_surface_t, glitz_surface_srcp), 
                      TO_PTR (glitz_surface_t, glitz_surface_destp), 
                      x_src, y_src, 
@@ -236,6 +288,9 @@
   (JNIEnv *env, jclass me, jlong glitz_surface_srcp) {
   
 #ifdef CAIRO_HAS_GL_SURFACE
+#   ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "glitz_surface_update_size (%p)\n", TO_PTR (glitz_surface_t, glitz_surface_srcp));
+#   endif
       glitz_surface_update_size (TO_PTR (glitz_surface_t, glitz_surface_srcp));
 #else
     throw_surface_not_supported_exception (env, "glitz");
@@ -252,6 +307,9 @@
   (JNIEnv *env, jclass me, jlong glitz_surface_srcp) {
   
 #ifdef CAIRO_HAS_GL_SURFACE
+#   ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "glitz_surface_destroy (%p)\n", TO_PTR (glitz_surface_t, glitz_surface_srcp));
+#   endif
       glitz_surface_destroy( TO_PTR (glitz_surface_t, glitz_surface_srcp));
 #else
     throw_surface_not_supported_exception (env, "glitz");
@@ -265,7 +323,7 @@
  * Signature: (Ljava/lang/String;)V
  */
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoGlitzSurface_cairo_1glitz_1init
-  (JNIEnv *env, jclass me, jstring j_opengl_lib) {
+(JNIEnv *env, jclass me, jstring j_opengl_lib) {
   
 #ifdef CAIRO_HAS_GL_SURFACE
     const char* opengl_lib;
@@ -274,9 +332,40 @@
         if (opengl_lib == NULL) {
             return;  // out of memory exception thrown
         }
+#   ifdef CAIROJAVA_TRACE
+        fprintf(stderr, "glitz_glx_init (%s)\n", opengl_lib);
+#   endif
         glitz_glx_init (opengl_lib);
         env->ReleaseStringUTFChars (j_opengl_lib, opengl_lib);
     }
 #endif
-  
+}
+
+/*
+ * Class:     org_cairographics_cairo_CairoGlitzSurface
+ * Method:    glitz_surface_clip_rectangle
+ * Signature: (JSIIII)V
+ */
+JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoGlitzSurface_glitz_1surface_1clip_1rectangle
+(JNIEnv *env, jclass me, jlong glitz_surfacep, jshort clip_operator, jint x, jint y, jint width, jint height)
+{
+#ifdef CAIRO_HAS_GL_SURFACE
+    glitz_rectangle_t clip_rect;
+
+    clip_rect.x = (short) x;
+    clip_rect.y = (short) y;
+    clip_rect.width = (unsigned short) width;
+    clip_rect.height = (unsigned short) height;
+
+#   ifdef CAIROJAVA_TRACE
+    
+    fprintf(stderr, "glitz_surface_clip_rectangles (%p, %d, %p[x=%d, y=%d, width=%d, height=%d], %d)\n", 
+                     TO_PTR (glitz_surface_t, glitz_surfacep),
+                     clip_operator, 
+                     &clip_rect, clip_rect.x, clip_rect.y, clip_rect.width, clip_rect.height, 1);
+#   endif
+    glitz_surface_clip_rectangles ( TO_PTR(glitz_surface_t, glitz_surfacep),
+                                    (glitz_clip_operator_t) clip_operator,
+                                    &clip_rect, 1);
+#endif
 }

Index: CairoImageBufferSurface.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoImageBufferSurface.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoImageBufferSurface.cpp	27 Oct 2004 03:45:37 -0000	1.3
+++ CairoImageBufferSurface.cpp	8 Nov 2004 17:52:57 -0000	1.4
@@ -58,6 +58,15 @@
 (JNIEnv *env, jclass me, jlong bufferp)
 {
     cairo_image_buffer_t *img = TO_PTR(cairo_image_buffer_t, bufferp);
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_surface_create_for_image (%p, %d, %d, %d, %d)\n",
+            img->bytes,
+            img->format,
+            img->width,
+            img->height,
+            img->stride);
+#endif
+
     cairo_surface_t *surface =
         cairo_surface_create_for_image(
             img->bytes,

Index: CairoLinearPattern.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoLinearPattern.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoLinearPattern.cpp	27 Oct 2004 03:45:37 -0000	1.3
+++ CairoLinearPattern.cpp	8 Nov 2004 17:52:57 -0000	1.4
@@ -58,5 +58,9 @@
 JNIEXPORT jlong JNICALL Java_org_cairographics_cairo_CairoLinearPattern_cairo_1pattern_1create_1linear
 (JNIEnv *env, jclass me, jdouble x0, jdouble y0, jdouble x1, jdouble y1)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_pattern_create_linear (%f, %f, %f, %f)\n", x0, y0, x1, y1);
+#endif
+
     return TO_LONG(cairo_pattern_create_linear(x0, y0, x1, y1));
 }

Index: CairoMatrix.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoMatrix.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoMatrix.cpp	27 Oct 2004 03:45:37 -0000	1.3
+++ CairoMatrix.cpp	8 Nov 2004 17:52:57 -0000	1.4
@@ -58,6 +58,9 @@
 JNIEXPORT jlong JNICALL Java_org_cairographics_cairo_CairoMatrix_cairo_1matrix_1create
 (JNIEnv *env, jclass me)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_matrix_create ()\n");
+#endif
     return TO_LONG(cairo_matrix_create());
 }   
 
@@ -69,6 +72,9 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoMatrix_cairo_1matrix_1destroy
 (JNIEnv *env, jclass me, jlong matrix)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_matrix_destroy (%p)\n", TO_PTR(cairo_matrix_t, matrix));
+#endif
     cairo_matrix_destroy(TO_PTR(cairo_matrix_t, matrix));
 }
 
@@ -80,6 +86,12 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoMatrix_cairo_1matrix_1copy
 (JNIEnv *env, jclass me, jlong matrix, jlong other)
 {
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrix), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_matrix_copy (" CAIROJAVA_TRACE_MATRIX_FPRINTF_STR ", %p)\n", 
+                    TO_PTR(cairo_matrix_t, matrix), a, b, c, d, tx, ty, TO_PTR(cairo_matrix_t, other));
+#endif
     cairo_matrix_copy(TO_PTR(cairo_matrix_t, matrix), TO_PTR(cairo_matrix_t, other));
 }
 
@@ -91,6 +103,9 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoMatrix_cairo_1matrix_1set_1identity
   (JNIEnv *env, jclass me, jlong matrix)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_matrix_set_identity (%p)\n", TO_PTR(cairo_matrix_t, matrix));
+#endif
     cairo_matrix_set_identity(TO_PTR(cairo_matrix_t, matrix));
 }
 
@@ -105,6 +120,10 @@
     jdouble c, jdouble d,
     jdouble tx, jdouble ty)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_matrix_set_affine (" CAIROJAVA_TRACE_MATRIX_FPRINTF_STR "\n",  
+            TO_PTR(cairo_matrix_t, matrix), a, b, c, d, tx, ty);
+#endif
     cairo_matrix_set_affine(TO_PTR(cairo_matrix_t, matrix), a, b, c, d, tx, ty);
 }
 
@@ -117,6 +136,10 @@
 (JNIEnv *env, jclass me, jlong matrix, jdoubleArray vec)
 {
     double *elems = env->GetDoubleArrayElements(vec, NULL);
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_matrix_set_affine (" CAIROJAVA_TRACE_MATRIX_FPRINTF_STR "\n",  
+            TO_PTR(cairo_matrix_t, matrix), elems[0], elems[1], elems[2], elems[3], elems[4], elems[5]);
+#endif
     cairo_matrix_set_affine(TO_PTR(cairo_matrix_t, matrix), 
                             elems[0], elems[1], elems[2], elems[3], elems[4], elems[5]);
     env->ReleaseDoubleArrayElements(vec, elems, 0);
@@ -133,6 +156,13 @@
     jdoubleArray affine = env->NewDoubleArray(6);
     double *elems = env->GetDoubleArrayElements(affine, NULL);
 
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrixp), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_matrix_get_affine (" CAIROJAVA_TRACE_MATRIX_FPRINTF_STR ", %p, %p, %p, %p, %p, %p)\n",  
+            TO_PTR(cairo_matrix_t, matrixp), a, b, c, d, tx, ty,
+            &elems[0], &elems[1], &elems[2], &elems[3], &elems[4], &elems[5]);
+#endif
     cairo_matrix_get_affine(TO_PTR(cairo_matrix_t, matrixp),
                       &elems[0], &elems[1],
                       &elems[2], &elems[3],
@@ -151,7 +181,16 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoMatrix_cairo_1matrix_1translate
   (JNIEnv *env, jclass me, jlong matrix, jdouble dx, jdouble dy)
 {
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrix), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_matrix_translate (" CAIROJAVA_TRACE_MATRIX_FPRINTF_STR ", %f, %f)", 
+            TO_PTR(cairo_matrix_t, matrix), a, b, c, d, tx, ty, dx, dy);
+#endif
     cairo_matrix_translate(TO_PTR(cairo_matrix_t, matrix), dx, dy);
+#ifdef CAIROJAVA_TRACE
+	fprintf(stderr, " --> (%f, %f)\n", dx, dy);
+#endif
 }
 
 /*
@@ -162,7 +201,16 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoMatrix_cairo_1matrix_1scale
   (JNIEnv *env, jclass me, jlong matrix, jdouble sx, jdouble sy)
 {
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrix), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_matrix_scale (" CAIROJAVA_TRACE_MATRIX_FPRINTF_STR ", %f, %f)", 
+            TO_PTR(cairo_matrix_t, matrix), a, b, c, d, tx, ty, sx, sy);
+#endif
     cairo_matrix_scale(TO_PTR(cairo_matrix_t, matrix), sx, sy);
+#ifdef CAIROJAVA_TRACE
+	fprintf(stderr, " --> (%f, %f)\n", sx, sy);
+#endif
 }
 
 /*
@@ -173,6 +221,12 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoMatrix_cairo_1matrix_1rotate
   (JNIEnv *env, jclass me, jlong matrix, jdouble angle)
 {
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrix), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_matrix_rotate (" CAIROJAVA_TRACE_MATRIX_FPRINTF_STR ", %f)\n", 
+            TO_PTR(cairo_matrix_t, matrix), a, b, c, d, tx, ty, angle);
+#endif
     cairo_matrix_rotate(TO_PTR(cairo_matrix_t, matrix), angle);
 }
 
@@ -184,6 +238,12 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoMatrix_cairo_1matrix_1invert
   (JNIEnv *env, jclass me, jlong matrix)
 {
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrix), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_matrix_invert (" CAIROJAVA_TRACE_MATRIX_FPRINTF_STR ")\n", 
+            TO_PTR(cairo_matrix_t, matrix), a, b, c, d, tx, ty);
+#endif
     cairo_matrix_invert(TO_PTR(cairo_matrix_t, matrix));
 }
 
@@ -195,6 +255,16 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoMatrix_cairo_1matrix_1multiply
   (JNIEnv *env, jclass me, jlong result, jlong a, jlong b)
 {
+#ifdef CAIROJAVA_TRACE
+    double a_a, b_a, c_a, d_a, tx_a, ty_a; 
+    double a_b, b_b, c_b, d_b, tx_b, ty_b; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, a), &a_a, &b_a, &c_a, &d_a, &tx_a, &ty_a);
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, b), &a_b, &b_b, &c_b, &d_b, &tx_b, &ty_b);
+    fprintf(stderr, "cairo_matrix_multiply (%p, " CAIROJAVA_TRACE_MATRIX_FPRINTF_STR 
+                    ", " CAIROJAVA_TRACE_MATRIX_FPRINTF_STR "\n", TO_PTR(cairo_t, result), 
+                    TO_PTR(cairo_matrix_t, a), a_a, b_a, c_a, d_a, tx_a, ty_a,
+                    TO_PTR(cairo_matrix_t, b), a_b, b_b, c_b, d_b, tx_b, ty_b);
+#endif
     cairo_matrix_multiply(TO_PTR(cairo_matrix_t, result),
                             TO_PTR(cairo_matrix_t, a),
                             TO_PTR(cairo_matrix_t, b));
@@ -208,7 +278,16 @@
 JNIEXPORT jdoubleArray JNICALL Java_org_cairographics_cairo_CairoMatrix_cairo_1matrix_1transform_1distance
   (JNIEnv *env, jclass me, jlong matrixp, jdouble dx, jdouble dy)
 {
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrixp), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_matrix_transform_distance (" CAIROJAVA_TRACE_MATRIX_FPRINTF_STR ", %f, %f)", 
+            TO_PTR(cairo_matrix_t, matrixp), a, b, c, d, tx, ty, dx, dy);
+#endif
     cairo_matrix_transform_distance(TO_PTR(cairo_matrix_t, matrixp), &dx, &dy);
+#ifdef CAIROJAVA_TRACE
+	fprintf(stderr, " --> (%f, %f)\n", dx, dy);
+#endif
     return newPoint(env, dx, dy);
 }
 
@@ -220,6 +299,16 @@
 JNIEXPORT jdoubleArray JNICALL Java_org_cairographics_cairo_CairoMatrix_cairo_1matrix_1transform_1point
   (JNIEnv *env, jclass me, jlong matrixp, jdouble x, jdouble y)
 {
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrixp), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_matrix_transform_point (" CAIROJAVA_TRACE_MATRIX_FPRINTF_STR ", %f, %f)", 
+            TO_PTR(cairo_matrix_t, matrixp), a, b, c, d, tx, ty, x, y);
+#endif
     cairo_matrix_transform_point(TO_PTR(cairo_matrix_t, matrixp), &x, &y);
+#ifdef CAIROJAVA_TRACE
+	fprintf(stderr, " --> (%f, %f)\n", x, y);
+#endif
+
     return newPoint(env, x, y);
 }

Index: CairoPattern.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoPattern.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoPattern.cpp	27 Oct 2004 03:45:37 -0000	1.3
+++ CairoPattern.cpp	8 Nov 2004 17:52:57 -0000	1.4
@@ -44,7 +44,8 @@
  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
- */
+*/
+
 #include <cairo.h>
 #include "CairoPattern.h"
 #include "utils.h"
@@ -57,6 +58,9 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1reference
 (JNIEnv *env, jclass me, jlong patternp)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_pattern_reference (%p)\n", TO_PTR(cairo_pattern_t, patternp));
+#endif
     cairo_pattern_reference(TO_PTR(cairo_pattern_t, patternp));
 }
 
@@ -68,6 +72,9 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1destroy
 (JNIEnv *env, jclass me, jlong patternp)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_pattern_destroy (%p)\n", TO_PTR(cairo_pattern_t, patternp));
+#endif
     cairo_pattern_destroy(TO_PTR(cairo_pattern_t, patternp));
 }
 
@@ -79,6 +86,10 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1add_1color_1stop
 (JNIEnv *env, jclass me, jlong patternp, jdouble offset, jdouble r, jdouble g, jdouble b, jdouble alpha)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_pattern_add_color_stop (%p, %f, %f, %f, %f, %f)\n", 
+            TO_PTR(cairo_pattern_t, patternp), offset, r, g, b, alpha);
+#endif
     cairo_pattern_add_color_stop(TO_PTR(cairo_pattern_t, patternp),
                                  offset, r, g, b, alpha);
 }
@@ -91,6 +102,12 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1set_1matrix
 (JNIEnv *env, jclass me, jlong patternp, jlong matrixp)
 {
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrixp), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_pattern_set_matrix (%p, " CAIROJAVA_TRACE_MATRIX_FPRINTF_STR ")\n", 
+            TO_PTR(cairo_pattern_t, patternp), TO_PTR(cairo_matrix_t, matrixp), a, b, c, d, tx, ty);
+#endif
     cairo_pattern_set_matrix(TO_PTR(cairo_pattern_t, patternp), TO_PTR(cairo_matrix_t, matrixp));
 }
 
@@ -102,6 +119,10 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1get_1matrix
 (JNIEnv *env, jclass me, jlong patternp, jlong matrixp)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_pattern_get_matrix (%p, %p)\n", 
+            TO_PTR(cairo_pattern_t, patternp), TO_PTR(cairo_matrix_t, matrixp));
+#endif
     cairo_pattern_get_matrix(TO_PTR(cairo_pattern_t, patternp), TO_PTR(cairo_matrix_t, matrixp));
 }
 
@@ -113,6 +134,10 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1set_1extend
 (JNIEnv *env, jclass me, jlong patternp, jshort extend)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_pattern_set_extend (%p, %hd)\n", 
+            TO_PTR(cairo_pattern_t, patternp), extend);
+#endif
     cairo_pattern_set_extend(TO_PTR(cairo_pattern_t, patternp), (cairo_extend_t) extend);
 }
 
@@ -124,6 +149,10 @@
 JNIEXPORT jshort JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1get_1extend
   (JNIEnv *env, jclass me, jlong patternp)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_pattern_get_extend (%p)\n", 
+            TO_PTR(cairo_pattern_t, patternp));
+#endif
     return cairo_pattern_get_extend(TO_PTR(cairo_pattern_t, patternp));
 }
 
@@ -135,6 +164,10 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1set_1filter
 (JNIEnv *env, jclass me, jlong patternp, jshort extend)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_pattern_set_filter (%p, %hd)\n", 
+            TO_PTR(cairo_pattern_t, patternp), extend);
+#endif
     cairo_pattern_set_filter(TO_PTR(cairo_pattern_t, patternp), (cairo_filter_t) extend);
 }
 
@@ -146,5 +179,9 @@
 JNIEXPORT jshort JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1get_1filter
   (JNIEnv *env, jclass me, jlong patternp)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_pattern_get_filter (%p)\n", 
+            TO_PTR(cairo_pattern_t, patternp));
+#endif
     return cairo_pattern_get_filter(TO_PTR(cairo_pattern_t, patternp));
 }

Index: CairoRadialPattern.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoRadialPattern.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoRadialPattern.cpp	27 Oct 2004 03:45:37 -0000	1.3
+++ CairoRadialPattern.cpp	8 Nov 2004 17:52:57 -0000	1.4
@@ -58,6 +58,10 @@
 JNIEXPORT jlong JNICALL Java_org_cairographics_cairo_CairoRadialPattern_cairo_1pattern_1create_1radial
 (JNIEnv *env, jclass me, jdouble cx0, jdouble cy0, jdouble r0, jdouble cx1, jdouble cy1, jdouble r1)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_pattern_create_radial (%f, %f, %f, %f, %f, %f)\n",
+            cx0, cy0, r0, cx1, cy1, r1);
+#endif
     return TO_LONG(cairo_pattern_create_radial(cx0, cy0, r0, cx1, cy1, r1));
 }
 

Index: CairoSWTSurface.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoSWTSurface.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CairoSWTSurface.cpp	27 Oct 2004 03:45:37 -0000	1.4
+++ CairoSWTSurface.cpp	8 Nov 2004 17:52:57 -0000	1.5
@@ -45,6 +45,7 @@
  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
  */
+
 #include <cairo.h>
 #include "CairoSWTSurface.h"
 #include "utils.h"
@@ -64,6 +65,14 @@
     GdkPixmap *drawable = (GdkPixmap *) (long) image;
 
     Display *dpy = GDK_PIXMAP_XDISPLAY(drawable);
+#    ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_xlib_surface_create (%p, %ld, %p, %d, %ld)\n", 
+            dpy, 
+            GDK_PIXMAP_XID(drawable),
+            DefaultVisual (dpy, DefaultScreen (dpy)),
+            0,
+            DefaultColormap (dpy, DefaultScreen (dpy)));
+#    endif
     cairo_surface_t *surface = cairo_xlib_surface_create (
         dpy, 
         GDK_PIXMAP_XID(drawable),
@@ -96,6 +105,14 @@
                                         &drawable, &x_offset, &y_offset);
 
     Display *dpy = GDK_WINDOW_XDISPLAY(drawable);
+#    ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_xlib_surface_create (%p, %ld, %p, %d, %ld)\n", 
+            dpy, 
+            GDK_PIXMAP_XID(drawable),
+            DefaultVisual (dpy, DefaultScreen (dpy)),
+            CAIRO_FORMAT_ARGB32,
+            DefaultColormap (dpy, DefaultScreen (dpy)));
+#    endif
     cairo_surface_t *surface = cairo_xlib_surface_create(
         dpy,
         GDK_DRAWABLE_XID(drawable),

Index: CairoSurface.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoSurface.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoSurface.cpp	27 Oct 2004 03:45:37 -0000	1.3
+++ CairoSurface.cpp	8 Nov 2004 17:52:57 -0000	1.4
@@ -45,6 +45,7 @@
  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
  */
+
 #include <cairo.h>
 #include "CairoSurface.h"
 #include "utils.h"
@@ -59,6 +60,10 @@
     jshort format, jint width, jint height)
 {
     cairo_surface_t* surface = TO_PTR(cairo_surface_t, neighbor);
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_surface_create_similar (%p, %hd, %d, %d)\n", 
+            surface, format, width, height);
+#endif
     return TO_LONG(cairo_surface_create_similar(surface, (cairo_format_t) format,
                                          width, height));
 }
@@ -71,6 +76,9 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoSurface_cairo_1surface_1reference
   (JNIEnv *env, jclass me, jlong surface)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_surface_reference (%p)\n", TO_PTR(cairo_surface_t, surface));
+#endif
     cairo_surface_reference(TO_PTR(cairo_surface_t, surface));
 }
 
@@ -82,6 +90,9 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoSurface_cairo_1surface_1destroy
   (JNIEnv *env, jclass me, jlong surface)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_surface_destroy (%p)\n", TO_PTR(cairo_surface_t, surface));
+#endif
     cairo_surface_destroy(TO_PTR(cairo_surface_t, surface));
 }
 
@@ -94,6 +105,9 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoSurface_cairo_1surface_1set_1repeat
   (JNIEnv *env, jclass me, jlong surface, jint repeat)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_surface_set_repeat (%p, %d)\n", TO_PTR(cairo_surface_t, surface), repeat);
+#endif
     (jshort) cairo_surface_set_repeat(TO_PTR(cairo_surface_t, surface), repeat);
 }
 
@@ -105,6 +119,12 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoSurface_cairo_1surface_1set_1matrix
   (JNIEnv *env, jclass me, jlong surface, jlong matrix) 
 {
+#ifdef CAIROJAVA_TRACE
+    double a, b, c, d, tx, ty; 
+    cairo_matrix_get_affine (TO_PTR(cairo_matrix_t, matrix), &a, &b, &c, &d, &tx, &ty);
+    fprintf(stderr, "cairo_set_matrix (%p, " CAIROJAVA_TRACE_MATRIX_FPRINTF_STR "\n", 
+                    TO_PTR(cairo_surface_t, surface), TO_PTR(cairo_matrix_t, matrix), a, b, c, d, tx, ty);
+#endif
     cairo_surface_set_matrix(TO_PTR(cairo_surface_t, surface),
                               TO_PTR(cairo_matrix_t, matrix));
 }
@@ -117,7 +137,10 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoSurface_cairo_1surface_1get_1matrix
   (JNIEnv *env, jclass me, jlong surface, jlong matrix)
 {
-    
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_surface_get_matrix (%p, %p)\n", TO_PTR(cairo_surface_t, surface), 
+            TO_PTR(cairo_matrix_t, matrix));
+#endif
     cairo_surface_get_matrix(TO_PTR(cairo_surface_t, surface),
                                     TO_PTR(cairo_matrix_t, matrix));
 }
@@ -130,6 +153,9 @@
 JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoSurface_cairo_1surface_1set_1filter
   (JNIEnv *env, jclass me, jlong surface, jshort filter)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_surface_set_filter (%p, %hd)\n", TO_PTR(cairo_surface_t, surface), filter);
+#endif
     cairo_surface_set_filter(TO_PTR(cairo_surface_t, surface), (cairo_filter_t) filter);
 }
 
@@ -141,5 +167,8 @@
 JNIEXPORT jshort JNICALL Java_org_cairographics_cairo_CairoSurface_cairo_1surface_1get_1filter
   (JNIEnv *env, jclass me, jlong surface)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_surface_get_filter (%p)\n", TO_PTR(cairo_surface_t, surface));
+#endif
     return cairo_surface_get_filter(TO_PTR(cairo_surface_t, surface));
 }

Index: CairoSurfacePattern.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoSurfacePattern.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoSurfacePattern.cpp	27 Oct 2004 03:45:37 -0000	1.3
+++ CairoSurfacePattern.cpp	8 Nov 2004 17:52:57 -0000	1.4
@@ -58,6 +58,8 @@
 JNIEXPORT jlong JNICALL Java_org_cairographics_cairo_CairoSurfacePattern_cairo_1pattern_1create_1for_1surface
 (JNIEnv *env, jclass me, jlong surfacep)
 {
+#ifdef CAIROJAVA_TRACE
+    fprintf(stderr, "cairo_pattern_create_for_surface (%p)\n", TO_PTR(cairo_surface_t, surfacep));
+#endif
     return TO_LONG(cairo_pattern_create_for_surface(TO_PTR(cairo_surface_t, surfacep)));
 }
-

Index: utils.h
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/utils.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- utils.h	27 Oct 2004 03:45:37 -0000	1.4
+++ utils.h	8 Nov 2004 17:52:57 -0000	1.5
@@ -55,6 +55,8 @@
 #define TO_PTR(type, longvalue) ((type *) (long) longvalue)
 #define TO_LONG(ptr) (jlong) (long) ptr
 
+#define CAIROJAVA_TRACE_MATRIX_FPRINTF_STR "%p[a=%f, b=%f, c=%f, d=%f, tx=%f, ty=%f]"
+
 jdoubleArray newPoint(JNIEnv *env, double x, double y);
 void throw_surface_not_supported_exception(JNIEnv *env, const char* surfaceType);
 void check_cairo_error(JNIEnv *env, cairo_t* cr);




More information about the cairo-commit mailing list