[cairo-commit] CairoJava/jni libcairoJni.cpp,1.3,1.4

Soorya Kuloor commit at pdx.freedesktop.org
Mon Nov 17 09:43:57 PST 2003


Committed by: skuloor

Update of /cvs/cairo/CairoJava/jni
In directory pdx:/tmp/cvs-serv12601

Modified Files:
	libcairoJni.cpp 
Log Message:
Synched up with latest version of cairo

Index: libcairoJni.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/libcairoJni.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** libcairoJni.cpp	7 Aug 2003 20:43:38 -0000	1.3
--- libcairoJni.cpp	17 Nov 2003 17:43:55 -0000	1.4
***************
*** 36,39 ****
--- 36,40 ----
  #include <libcairoJni.h>
  #include <cairo.h>
+ #include <cairo-xlib.h>
  #include <gdk/gdkx.h>
  #include <gtk/gtkwidget.h>
***************
*** 129,133 ****
      double curx, cury;
  
!     cairo_get_current_point(xrs, &curx, &cury);
      
      /* Check that neither radius is zero, since its isn't either
--- 130,134 ----
      double curx, cury;
  
!     cairo_current_point(xrs, &curx, &cury);
      
      /* Check that neither radius is zero, since its isn't either
***************
*** 595,599 ****
  {
      const char *utfchars = env->GetStringUTFChars(fontName, NULL);
!     cairo_select_font(TO_PTR(cairo_t, xrsp), utfchars);
      env->ReleaseStringUTFChars(fontName, utfchars);
  }
--- 596,604 ----
  {
      const char *utfchars = env->GetStringUTFChars(fontName, NULL);
!     /*
!      *casted utfchars to accept const char *
!      */
!     cairo_select_font(TO_PTR(cairo_t, xrsp), (char *)utfchars,
!     CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
      env->ReleaseStringUTFChars(fontName, utfchars);
  }
***************
*** 617,624 ****
  JNIEXPORT void JNICALL Java_org_cairographics_cairo_internal_CairoAPI_transformFont(
      JNIEnv *env, jclass me, jlong xrsp,
!     jdouble a, jdouble b,
!     jdouble c, jdouble d)
  {
!     cairo_transform_font(TO_PTR(cairo_t, xrsp), a, b, c, d);
  }
  
--- 622,628 ----
  JNIEXPORT void JNICALL Java_org_cairographics_cairo_internal_CairoAPI_transformFont(
      JNIEnv *env, jclass me, jlong xrsp,
!     cairo_matrix_t *matrix)
  {
!     cairo_transform_font(TO_PTR(cairo_t, xrsp), matrix);
  }
  
***************
*** 628,631 ****
--- 632,637 ----
   * Signature: (JLjava/lang/String;)Lcom/verano/schematx/draw/gtk/Xr$TextExtents;
   */
+ 
+ /* XXX: NYI 14.11.2003
  JNIEXPORT jdoubleArray JNICALL Java_org_cairographics_cairo_internal_CairoAPI_getTextExtents(
      JNIEnv *env, jclass me, jlong xrsp, jstring text)
***************
*** 647,650 ****
--- 653,657 ----
      return extents;
  }
+ */
  
  /*
***************
*** 681,685 ****
  JNIEXPORT jlong JNICALL Java_org_cairographics_cairo_internal_CairoAPI_getTargetSurface(JNIEnv *env, jclass me, jlong xrsp)
  {
!     return TO_LONG(cairo_get_target_surface(TO_PTR(cairo_t, xrsp)));
  }
  
--- 688,692 ----
  JNIEXPORT jlong JNICALL Java_org_cairographics_cairo_internal_CairoAPI_getTargetSurface(JNIEnv *env, jclass me, jlong xrsp)
  {
!     return TO_LONG(cairo_current_target_surface(TO_PTR(cairo_t, xrsp)));
  }
  
***************
*** 692,696 ****
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (short) cairo_get_status(TO_PTR(cairo_t, xrsp));
  }
  
--- 699,703 ----
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (short) cairo_status(TO_PTR(cairo_t, xrsp));
  }
  
***************
*** 703,707 ****
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return env->NewStringUTF(cairo_get_status_string(TO_PTR(cairo_t, xrsp)));
  }
  
--- 710,714 ----
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return env->NewStringUTF(cairo_status_string(TO_PTR(cairo_t, xrsp)));
  }
  
***************
*** 721,725 ****
  
      Display *dpy = GDK_WINDOW_XDISPLAY(drawable);
!     cairo_surface_t *surface = cairo_surface_create_for_drawable (
          dpy,
          GDK_DRAWABLE_XID(drawable),
--- 728,732 ----
  
      Display *dpy = GDK_WINDOW_XDISPLAY(drawable);
!     cairo_surface_t *surface = cairo_xlib_surface_create (
          dpy,
          GDK_DRAWABLE_XID(drawable),
***************
*** 751,754 ****
--- 758,763 ----
   * Signature: (JSIIDDDD)J
   */
+ 
+ /* XXX: NYI 14.11.2003
  JNIEXPORT jlong JNICALL Java_org_cairographics_cairo_internal_CairoAPI_surfaceCreateSimilarSolid(
      JNIEnv *env, jclass me, jlong neighbor,
***************
*** 757,761 ****
      jdouble red, jdouble green, jdouble blue, jdouble alpha)
  {
!     cairo_surface_t* surface = cairo_surface_create_similar_solid(
          TO_PTR(cairo_surface_t, neighbor),
          (cairo_format) format,
--- 766,770 ----
      jdouble red, jdouble green, jdouble blue, jdouble alpha)
  {
!     cairo_surface_t* surface = _cairo_surface_create_similar_solid(
          TO_PTR(cairo_surface_t, neighbor),
          (cairo_format) format,
***************
*** 765,768 ****
--- 774,778 ----
      return TO_LONG(surface);
  }
+ */
  
  /*
***************
*** 817,821 ****
      double curx, cury;
      cairo_t *xrs = TO_PTR(cairo_t, xrsp);
!     cairo_get_current_point(xrs, &curx, &cury);
      _svg_path_arc(xrs, rx, ry, x_axis_rotation,
                    large_arc_flag, sweep_flag, curx + dx, cury + dy);
--- 827,831 ----
      double curx, cury;
      cairo_t *xrs = TO_PTR(cairo_t, xrsp);
!     cairo_current_point(xrs, &curx, &cury);
      _svg_path_arc(xrs, rx, ry, x_axis_rotation,
                    large_arc_flag, sweep_flag, curx + dx, cury + dy);
***************
*** 830,834 ****
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (jshort) cairo_get_operator(TO_PTR(cairo_t, xrsp));
  }
  
--- 840,844 ----
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (jshort) cairo_current_operator(TO_PTR(cairo_t, xrsp));
  }
  
***************
*** 841,845 ****
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (jdouble) cairo_get_tolerance(TO_PTR(cairo_t, xrsp));
  }
  
--- 851,855 ----
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (jdouble) cairo_current_tolerance(TO_PTR(cairo_t, xrsp));
  }
  
***************
*** 853,857 ****
  {
      double x, y;
!     cairo_get_current_point(TO_PTR(cairo_t, xrsp), &x, &y);
  
      return newPoint(env, x, y);
--- 863,867 ----
  {
      double x, y;
!     cairo_current_point(TO_PTR(cairo_t, xrsp), &x, &y);
  
      return newPoint(env, x, y);
***************
*** 866,870 ****
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (jdouble) cairo_get_line_width(TO_PTR(cairo_t, xrsp));
  }
  
--- 876,880 ----
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (jdouble) cairo_current_line_width(TO_PTR(cairo_t, xrsp));
  }
  
***************
*** 877,881 ****
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (jshort) cairo_get_line_cap(TO_PTR(cairo_t, xrsp));
  }
  
--- 887,891 ----
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (jshort) cairo_current_line_cap(TO_PTR(cairo_t, xrsp));
  }
  
***************
*** 888,892 ****
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (jshort) cairo_get_line_join(TO_PTR(cairo_t, xrsp));
  }
  
--- 898,902 ----
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (jshort) cairo_current_line_join(TO_PTR(cairo_t, xrsp));
  }
  
***************
*** 899,903 ****
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (jdouble) cairo_get_miter_limit(TO_PTR(cairo_t, xrsp));
  }
  
--- 909,913 ----
      JNIEnv *env, jclass me, jlong xrsp)
  {
!     return (jdouble) cairo_current_miter_limit(TO_PTR(cairo_t, xrsp));
  }
  
***************
*** 1086,1090 ****
      double controlx1, controly1;
  
!     cairo_get_current_point(TO_PTR(cairo_t, xrs), &curx, &cury);
  
      controlx0 = curx + 2.0 / 3.0 * (x1 - curx);
--- 1096,1100 ----
      double controlx1, controly1;
  
!     cairo_current_point(TO_PTR(cairo_t, xrs), &curx, &cury);
  
      controlx0 = curx + 2.0 / 3.0 * (x1 - curx);
***************
*** 1111,1115 ****
      double curx, cury;
      
!     cairo_get_current_point(TO_PTR(cairo_t, xrs), &curx, &cury);
      Java_org_cairographics_cairo_internal_CairoAPI_quadTo(
          env, me, xrs,
--- 1121,1125 ----
      double curx, cury;
      
!     cairo_current_point(TO_PTR(cairo_t, xrs), &curx, &cury);
      Java_org_cairographics_cairo_internal_CairoAPI_quadTo(
          env, me, xrs,
***************
*** 1261,1265 ****
  {
      double curx, cury;
!     cairo_get_current_point(TO_PTR(cairo_t, xrs), &curx, &cury);
      
      cairo_line_to(TO_PTR(cairo_t, xrs), x, cury);
--- 1271,1275 ----
  {
      double curx, cury;
!     cairo_current_point(TO_PTR(cairo_t, xrs), &curx, &cury);
      
      cairo_line_to(TO_PTR(cairo_t, xrs), x, cury);
***************
*** 1284,1288 ****
  {
      double curx, cury;
!     cairo_get_current_point(TO_PTR(cairo_t, xrs), &curx, &cury);
      
      cairo_line_to(TO_PTR(cairo_t, xrs), curx, y);
--- 1294,1298 ----
  {
      double curx, cury;
!     cairo_current_point(TO_PTR(cairo_t, xrs), &curx, &cury);
      
      cairo_line_to(TO_PTR(cairo_t, xrs), curx, y);
***************
*** 1310,1314 ****
  
      Display *dpy = GDK_PIXMAP_XDISPLAY(drawable);
!     cairo_surface_t *surface = cairo_surface_create_for_drawable (
          dpy, 
          GDK_PIXMAP_XID(drawable),
--- 1320,1324 ----
  
      Display *dpy = GDK_PIXMAP_XDISPLAY(drawable);
!     cairo_surface_t *surface = cairo_xlib_surface_create (
          dpy, 
          GDK_PIXMAP_XID(drawable),





More information about the cairo-commit mailing list