/[classpath]/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
ViewVC logotype

Diff of /classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by mark, Fri Jul 30 16:01:47 2004 UTC revision 1.9.2.1 by gnu_andrew, Thu Jan 13 22:40:45 2005 UTC
# Line 400  JNIEXPORT void JNICALL Java_gnu_java_awt Line 400  JNIEXPORT void JNICALL Java_gnu_java_awt
400    struct graphics2d *src = NULL, *dst = NULL;    struct graphics2d *src = NULL, *dst = NULL;
401    gint s_height, s_width, d_height, d_width, height, width;    gint s_height, s_width, d_height, d_width, height, width;
402    cairo_matrix_t *matrix;    cairo_matrix_t *matrix;
   GdkGC *gc;  
403    cairo_operator_t tmp_op;    cairo_operator_t tmp_op;
404    
405    gdk_threads_enter();    gdk_threads_enter();
# Line 605  JNIEXPORT void JNICALL Java_gnu_java_awt Line 604  JNIEXPORT void JNICALL Java_gnu_java_awt
604       negate offsets. oh well.       negate offsets. oh well.
605            
606     */     */
607      {
608    double a = (x2 - x1 == 0.) ? 0. : ((cyclic ? 3.0 : 2.0) / (x2 - x1));      double a = (x2 - x1 == 0.) ? 0. : ((cyclic ? 3.0 : 2.0) / (x2 - x1));
609    double c = (y2 - y1 == 0.) ? 0. : (1. / (y2 - y1));      double c = (y2 - y1 == 0.) ? 0. : (1. / (y2 - y1));
610    double dx = (x1 == 0.) ? 0. : 1. / x1;      double dx = (x1 == 0.) ? 0. : 1. / x1;
611    double dy = (y1 == 0.) ? 0. : 1. / y1;      double dy = (y1 == 0.) ? 0. : 1. / y1;
612        
613    cairo_matrix_set_affine (mat,      cairo_matrix_set_affine (mat,
614                             a, 0.,                               a, 0.,
615                             c, 0.,                               c, 0.,
616                             dx, dy);                               dx, dy);
617        
618    cairo_surface_set_matrix (surf, mat);      cairo_surface_set_matrix (surf, mat);
619    cairo_matrix_destroy (mat);      cairo_matrix_destroy (mat);
620    cairo_surface_set_filter (surf, CAIRO_FILTER_BILINEAR);      cairo_surface_set_filter (surf, CAIRO_FILTER_BILINEAR);
621      }
622    
623    /* FIXME: repeating gradients (not to mention hold gradients) don't seem to work. */    /* FIXME: repeating gradients (not to mention hold gradients) don't seem to work. */
624    /*   cairo_surface_set_repeat (surf, cyclic ? 1 : 0); */    /*   cairo_surface_set_repeat (surf, cyclic ? 1 : 0); */
# Line 751  JNIEXPORT jintArray JNICALL Java_gnu_jav Line 751  JNIEXPORT jintArray JNICALL Java_gnu_jav
751    jint i, px;    jint i, px;
752    
753    gdk_threads_enter();    gdk_threads_enter();
754    if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }    if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return NULL; }
755    
756    gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);    gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
757    g_assert (gr != NULL);    g_assert (gr != NULL);

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.9.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26