[cairo-commit] rendertest/src rendertest.c,1.5,1.6

David Reveman commit at pdx.freedesktop.org
Thu Sep 9 17:22:49 PDT 2004


Committed by: davidr

Update of /cvs/cairo/rendertest/src
In directory gabe:/tmp/cvs-serv12643/src

Modified Files:
	rendertest.c 
Log Message:
Added gradient projective transform test

Index: rendertest.c
===================================================================
RCS file: /cvs/cairo/rendertest/src/rendertest.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rendertest.c	6 Sep 2004 22:28:24 -0000	1.5
--- rendertest.c	10 Sep 2004 00:22:47 -0000	1.6
***************
*** 1060,1064 ****
    if (TEST_CHECK) {
      render_matrix_t m;
! 
      m.m[0][0] = 1.0 / ((w * 8) / 10);
      m.m[0][1] = 0.0;
--- 1060,1064 ----
    if (TEST_CHECK) {
      render_matrix_t m;
!     
      m.m[0][0] = 1.0 / ((w * 8) / 10);
      m.m[0][1] = 0.0;
***************
*** 1072,1076 ****
      m.m[2][1] = 0.0;
      m.m[2][2] = 1.0;
! 
      /* using default normalized gradient parameters and default
         color stop parameters */
--- 1072,1076 ----
      m.m[2][1] = 0.0;
      m.m[2][2] = 1.0;
!     
      /* using default normalized gradient parameters and default
         color stop parameters */
***************
*** 1086,1089 ****
--- 1086,1125 ----
      _render_composite_tests (&info, grad2x1, NULL, status);
      _render_set_filter (grad2x1, RENDER_FILTER_NEAREST, NULL, 0);
+     _render_set_transform (grad2x1, &_identity);
+   }
+ 
+     if (TEST_CHECK) {
+     render_matrix_t m = {
+       {
+         { 1.0, 0.0, -32.0 },
+         { 0.0, -2.0, 200.0 },
+         { 0.0, 1.0 / 48.0, 1.0 },
+       }
+     };
+     render_fixed16_16_t params[4];
+ 
+     /* center */
+     params[0] = DOUBLE_TO_FIXED (32.0);
+     params[1] = DOUBLE_TO_FIXED (32.0);
+ 
+     /* radius0 */
+     params[2] = DOUBLE_TO_FIXED (0.0);
+ 
+     /* radius1 */
+     params[3] = DOUBLE_TO_FIXED (32.0);
+ 
+     _print_info ("composite ARGB source with radial gradient filter "
+                  "(2 color stops) and \n    projective transform\n",
+                  test, info.s);
+     status = _render_set_transform (grad2x1, &m);
+     if (!status)
+       status = _render_set_filter (grad2x1,
+                                    RENDER_FILTER_RADIAL_GRADIENT,
+                                    params,
+                                    sizeof (params) /
+                                    sizeof (render_fixed16_16_t));
+     _render_composite_tests (&info, grad2x1, NULL, status);
+     _render_set_filter (grad2x1, RENDER_FILTER_NEAREST, NULL, 0);
+     _render_set_transform (grad2x1, &_identity);
    }
  




More information about the cairo-commit mailing list