[cairo-commit] cairo/src cairo.h,1.41,1.42 cairo_surface.c,1.21,1.22 cairo_xlib_surface.c,1.14,1.15 cairoint.h,1.49,1.50

Graydon Hoare commit at pdx.freedesktop.org
Mon Aug 15 11:12:59 PDT 2005


Committed by: graydon

Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv28134/src

Modified Files:
	cairo.h cairo_surface.c cairo_xlib_surface.c cairoint.h 
Log Message:
2004-01-27  Graydon Hoare  <graydon at redhat.com>

	* src/cairoint.h (cairo_surface): New "filter" field.
	* src/cairo_surface.c 
	(cairo_surface_get_filter): New function.
	(cairo_surface_set_filter): Store filter in surface.
	* src/cairo.h (cairo_surface_get_filter): Declare.
	* src/cairo_xlib_surface.c
	(_cairo_xlib_surface_clone_similar): Copy filter setting.
	(_cairo_xlib_surface_set_filter): Use constants from Xrender.h



Index: cairo.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** cairo.h	23 Jan 2004 04:47:24 -0000	1.41
--- cairo.h	30 Jan 2004 22:44:18 -0000	1.42
***************
*** 593,596 ****
--- 593,599 ----
  cairo_surface_set_filter (cairo_surface_t *surface, cairo_filter_t filter);
  
+ cairo_filter_t 
+ cairo_surface_get_filter (cairo_surface_t *surface);
+ 
  /* Image-surface functions */
  

Index: cairo_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_surface.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** cairo_surface.c	4 Nov 2003 03:17:31 -0000	1.21
--- cairo_surface.c	30 Jan 2004 22:44:18 -0000	1.22
***************
*** 166,172 ****
--- 166,179 ----
  	return CAIRO_STATUS_NULL_POINTER;
  
+     surface->filter = filter;
      return surface->backend->set_filter (surface, filter);
  }
  
+ cairo_filter_t
+ cairo_surface_get_filter (cairo_surface_t *surface)
+ {
+     return surface->filter;
+ }
+ 
  /* XXX: NYI
  cairo_status_t

Index: cairo_xlib_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_xlib_surface.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** cairo_xlib_surface.c	24 Jan 2004 09:46:20 -0000	1.14
--- cairo_xlib_surface.c	30 Jan 2004 22:44:18 -0000	1.15
***************
*** 324,349 ****
  	return CAIRO_STATUS_SUCCESS;
  
-    /* XXX: The Render specification has capitalized versions of these
-            strings. However, the current implementation is
-            case-sensitive and expects lowercase versions.
-    */
      switch (filter) {
      case CAIRO_FILTER_FAST:
! 	render_filter = "fast";
  	break;
      case CAIRO_FILTER_GOOD:
! 	render_filter = "good";
  	break;
      case CAIRO_FILTER_BEST:
! 	render_filter = "best";
  	break;
      case CAIRO_FILTER_NEAREST:
! 	render_filter = "nearest";
  	break;
      case CAIRO_FILTER_BILINEAR:
! 	render_filter = "bilinear";
  	break;
      default:
! 	render_filter = "best";
  	break;
      }
--- 324,345 ----
  	return CAIRO_STATUS_SUCCESS;
  
      switch (filter) {
      case CAIRO_FILTER_FAST:
! 	render_filter = FilterFast;
  	break;
      case CAIRO_FILTER_GOOD:
! 	render_filter = FilterGood;
  	break;
      case CAIRO_FILTER_BEST:
! 	render_filter = FilterBest;
  	break;
      case CAIRO_FILTER_NEAREST:
! 	render_filter = FilterNearest;
  	break;
      case CAIRO_FILTER_BILINEAR:
! 	render_filter = FilterBilinear;
  	break;
      default:
! 	render_filter = FilterBest;
  	break;
      }
***************
*** 391,394 ****
--- 387,392 ----
  	return NULL;
  
+     _cairo_xlib_surface_set_filter (clone, cairo_surface_get_filter(src_image));
+ 
      _cairo_xlib_surface_set_image (clone, src_image);
  

Index: cairoint.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairoint.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** cairoint.h	16 Dec 2003 15:20:20 -0000	1.49
--- cairoint.h	30 Jan 2004 22:44:18 -0000	1.50
***************
*** 401,404 ****
--- 401,405 ----
  
      cairo_matrix_t matrix;
+     cairo_filter_t filter;
      int repeat;
  };





More information about the cairo-commit mailing list