[cairo-commit] 2 commits - src/cairo-paginated-private.h src/cairo-paginated-surface.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 10 11:10:10 UTC 2023


 src/cairo-paginated-private.h |    4 ++--
 src/cairo-paginated-surface.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 72cc5ae5fab29cdbf15e7eaa9858df01ac99759b
Merge: 1cfea7d97 477c13441
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Tue Jan 10 11:10:08 2023 +0000

    Merge branch 'pr/Fix617' into 'master'
    
    Fix wrong paginated surface size (issue #617)
    
    Closes #617
    
    See merge request cairo/cairo!395

commit 477c134412dd711e101923ae996bf31e203d8821
Author: Benjamin Hennion <benjamin.hennion at wanadoo.fr>
Date:   Sat Jan 7 13:08:38 2023 +0100

    Make _cairo_paginated_surface_set_size takes double-typed width and
    height (instead of integers).
    
        Both cairo_pdf_surface_set_size and cairo_ps_surface_set_size passed on
        their width and height arguments (of type double) directly to
        _cairo_paginated_surface_set_size(cairo_paginated_surface_t*, int, int),
        so the width and height were truncated.
        A small part of the surface was then inaccessible for drawing (stripes
        on the right and bottom of the surface).
        This fixes that.

diff --git a/src/cairo-paginated-private.h b/src/cairo-paginated-private.h
index 89f1c99a2..cc8fd1c7b 100644
--- a/src/cairo-paginated-private.h
+++ b/src/cairo-paginated-private.h
@@ -178,7 +178,7 @@ _cairo_surface_is_paginated (cairo_surface_t *surface);
 
 cairo_private cairo_status_t
 _cairo_paginated_surface_set_size (cairo_surface_t 	*surface,
-				   int			 width,
-				   int			 height);
+				   double		 width,
+				   double		 height);
 
 #endif /* CAIRO_PAGINATED_H */
diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c
index a3f7cd9b2..07d86d070 100644
--- a/src/cairo-paginated-surface.c
+++ b/src/cairo-paginated-surface.c
@@ -166,8 +166,8 @@ _cairo_paginated_surface_get_recording (cairo_surface_t *surface)
 
 cairo_status_t
 _cairo_paginated_surface_set_size (cairo_surface_t	*surface,
-				   int			 width,
-				   int			 height)
+				   double		 width,
+				   double		 height)
 {
     cairo_paginated_surface_t *paginated_surface;
     cairo_status_t status;


More information about the cairo-commit mailing list