[cairo-commit] glitz/src glitz_filter.c, 1.5, 1.6 glitz_rect.c, 1.11, 1.12

David Reveman commit at pdx.freedesktop.org
Sat Sep 11 07:47:46 PDT 2004


Committed by: davidr

Update of /cvs/cairo/glitz/src
In directory gabe:/tmp/cvs-serv16928/src

Modified Files:
	glitz_filter.c glitz_rect.c 
Log Message:
Adjustment to color stop coordinate parameters of gradient filters

Index: glitz_filter.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_filter.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** glitz_filter.c	9 Sep 2004 09:50:26 -0000	1.5
--- glitz_filter.c	11 Sep 2004 14:47:44 -0000	1.6
***************
*** 271,276 ****
        
        o_default = i / (glitz_float_t) (size - 1);
!       x_default = 0.5f + (surface->width * i) / (glitz_float_t) size;
!       y_default = 0.5f + (surface->height * i) / (glitz_float_t) size;
        
        _glitz_filter_params_set (&vecs[i].v[2], o_default, &params, &n_params);
--- 271,276 ----
        
        o_default = i / (glitz_float_t) (size - 1);
!       x_default = (surface->width * i) / (glitz_float_t) size;
!       y_default = (surface->height * i) / (glitz_float_t) size;
        
        _glitz_filter_params_set (&vecs[i].v[2], o_default, &params, &n_params);
***************
*** 279,284 ****
  
        glitz_clamp_value (&vecs[i].v[2], 0.0f, 1.0f);
!       glitz_clamp_value (&vecs[i].v[0], 0.5f, surface->width - 0.5f);
!       glitz_clamp_value (&vecs[i].v[1], 0.5f, surface->height - 0.5f);
  
        vecs[i].v[0] += surface->texture.box.x1;
--- 279,287 ----
  
        glitz_clamp_value (&vecs[i].v[2], 0.0f, 1.0f);
!       glitz_clamp_value (&vecs[i].v[0], 0.0f, surface->width - 1.0f);
!       glitz_clamp_value (&vecs[i].v[1], 0.0f, surface->height - 1.0f);
! 
!       vecs[i].v[0] += 0.5f;
!       vecs[i].v[1] += 0.5f;
  
        vecs[i].v[0] += surface->texture.box.x1;

Index: glitz_rect.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_rect.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** glitz_rect.c	11 Sep 2004 04:22:30 -0000	1.11
--- glitz_rect.c	11 Sep 2004 14:47:44 -0000	1.12
***************
*** 124,131 ****
      
      pixel =
!       ((((unsigned int) color->red * 0xff) / 0xffff) << 24) |
!       ((((unsigned int) color->green * 0xff) / 0xffff) << 16) |
!       ((((unsigned int) color->blue * 0xff) / 0xffff) << 8) |
!       ((((unsigned int) color->alpha * 0xff) / 0xffff));
      
      p = glitz_buffer_map (buffer, GLITZ_BUFFER_ACCESS_WRITE_ONLY);
--- 124,131 ----
      
      pixel =
!       ((((unsigned int) color->alpha * 0xff) / 0xffff) << 24) |
!       ((((unsigned int) color->red * 0xff) / 0xffff) << 16) |
!       ((((unsigned int) color->green * 0xff) / 0xffff) << 8) |
!       ((((unsigned int) color->blue * 0xff) / 0xffff));
      
      p = glitz_buffer_map (buffer, GLITZ_BUFFER_ACCESS_WRITE_ONLY);




More information about the cairo-commit mailing list