summaryrefslogtreecommitdiff
path: root/boilerplate
diff options
context:
space:
mode:
Diffstat (limited to 'boilerplate')
-rw-r--r--boilerplate/cairo-boilerplate-beos-private.h16
-rw-r--r--boilerplate/cairo-boilerplate-beos.cpp8
-rw-r--r--boilerplate/cairo-boilerplate-directfb-private.h8
-rw-r--r--boilerplate/cairo-boilerplate-directfb.c8
-rw-r--r--boilerplate/cairo-boilerplate-glitz-agl.c8
-rw-r--r--boilerplate/cairo-boilerplate-glitz-glx.c10
-rw-r--r--boilerplate/cairo-boilerplate-glitz-private.h24
-rw-r--r--boilerplate/cairo-boilerplate-glitz-wgl.c8
-rw-r--r--boilerplate/cairo-boilerplate-pdf-private.h8
-rw-r--r--boilerplate/cairo-boilerplate-pdf.c14
-rw-r--r--boilerplate/cairo-boilerplate-ps-private.h16
-rw-r--r--boilerplate/cairo-boilerplate-ps.c30
-rw-r--r--boilerplate/cairo-boilerplate-qt-private.h10
-rw-r--r--boilerplate/cairo-boilerplate-qt.cpp8
-rw-r--r--boilerplate/cairo-boilerplate-quartz-private.h8
-rw-r--r--boilerplate/cairo-boilerplate-quartz.c8
-rw-r--r--boilerplate/cairo-boilerplate-script-private.h8
-rw-r--r--boilerplate/cairo-boilerplate-script.c12
-rw-r--r--boilerplate/cairo-boilerplate-svg-private.h16
-rw-r--r--boilerplate/cairo-boilerplate-svg.c30
-rw-r--r--boilerplate/cairo-boilerplate-test-surfaces-private.h40
-rw-r--r--boilerplate/cairo-boilerplate-test-surfaces.c40
-rw-r--r--boilerplate/cairo-boilerplate-win32-printing.c8
-rw-r--r--boilerplate/cairo-boilerplate-win32-private.h16
-rw-r--r--boilerplate/cairo-boilerplate-win32.c8
-rw-r--r--boilerplate/cairo-boilerplate-xcb-private.h8
-rw-r--r--boilerplate/cairo-boilerplate-xcb.c8
-rw-r--r--boilerplate/cairo-boilerplate-xlib-private.h24
-rw-r--r--boilerplate/cairo-boilerplate-xlib.c45
-rw-r--r--boilerplate/cairo-boilerplate.c10
-rw-r--r--boilerplate/cairo-boilerplate.h8
31 files changed, 241 insertions, 232 deletions
diff --git a/boilerplate/cairo-boilerplate-beos-private.h b/boilerplate/cairo-boilerplate-beos-private.h
index 1d800c26..4505d738 100644
--- a/boilerplate/cairo-boilerplate-beos-private.h
+++ b/boilerplate/cairo-boilerplate-beos-private.h
@@ -10,10 +10,10 @@ CAIRO_BEGIN_DECLS
extern cairo_surface_t *
_cairo_boilerplate_beos_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
@@ -24,10 +24,10 @@ _cairo_boilerplate_beos_cleanup (void* closure);
extern cairo_surface_t *
_cairo_boilerplate_beos_create_surface_for_bitmap (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-beos.cpp b/boilerplate/cairo-boilerplate-beos.cpp
index 497d9277..f5276276 100644
--- a/boilerplate/cairo-boilerplate-beos.cpp
+++ b/boilerplate/cairo-boilerplate-beos.cpp
@@ -172,8 +172,8 @@ struct beos_boilerplate_closure
cairo_surface_t *
_cairo_boilerplate_beos_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
+ double width,
+ double height,
cairo_boilerplate_mode_t mode,
void **closure)
{
@@ -207,8 +207,8 @@ _cairo_boilerplate_beos_cleanup (void* closure)
cairo_surface_t *
_cairo_boilerplate_beos_create_surface_for_bitmap (const char *name,
cairo_content_t content,
- int width,
- int height,
+ double width,
+ double height,
cairo_boilerplate_mode_t mode,
void **closure)
{
diff --git a/boilerplate/cairo-boilerplate-directfb-private.h b/boilerplate/cairo-boilerplate-directfb-private.h
index 87d1b8b0..a34edcba 100644
--- a/boilerplate/cairo-boilerplate-directfb-private.h
+++ b/boilerplate/cairo-boilerplate-directfb-private.h
@@ -10,10 +10,10 @@ CAIRO_BEGIN_DECLS
extern cairo_surface_t *
_cairo_boilerplate_directfb_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-directfb.c b/boilerplate/cairo-boilerplate-directfb.c
index 7a6462f6..ea7a8ad9 100644
--- a/boilerplate/cairo-boilerplate-directfb.c
+++ b/boilerplate/cairo-boilerplate-directfb.c
@@ -171,10 +171,10 @@ ERROR:
cairo_surface_t *
_cairo_boilerplate_directfb_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-glitz-agl.c b/boilerplate/cairo-boilerplate-glitz-agl.c
index dd10a00e..03d0423b 100644
--- a/boilerplate/cairo-boilerplate-glitz-agl.c
+++ b/boilerplate/cairo-boilerplate-glitz-agl.c
@@ -101,10 +101,10 @@ _cairo_boilerplate_glitz_agl_create_surface_internal (glitz_format_name_t form
cairo_surface_t *
_cairo_boilerplate_glitz_agl_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-glitz-glx.c b/boilerplate/cairo-boilerplate-glitz-glx.c
index 4c26b877..a1981ebf 100644
--- a/boilerplate/cairo-boilerplate-glitz-glx.c
+++ b/boilerplate/cairo-boilerplate-glitz-glx.c
@@ -153,11 +153,11 @@ _cairo_boilerplate_glitz_glx_create_surface_internal (glitz_format_name_t form
cairo_surface_t *
_cairo_boilerplate_glitz_glx_create_surface (const char *name,
- cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ cairo_content_t content,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-glitz-private.h b/boilerplate/cairo-boilerplate-glitz-private.h
index 052c7e06..62904c7c 100644
--- a/boilerplate/cairo-boilerplate-glitz-private.h
+++ b/boilerplate/cairo-boilerplate-glitz-private.h
@@ -41,10 +41,10 @@ typedef struct _glitz_target_closure_base {
cairo_surface_t *
_cairo_boilerplate_glitz_glx_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
@@ -57,10 +57,10 @@ _cairo_boilerplate_glitz_glx_cleanup (void *closure);
cairo_surface_t *
_cairo_boilerplate_glitz_agl_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
@@ -73,10 +73,10 @@ _cairo_boilerplate_glitz_agl_cleanup (void *closure);
cairo_surface_t *
_cairo_boilerplate_glitz_wgl_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-glitz-wgl.c b/boilerplate/cairo-boilerplate-glitz-wgl.c
index dfd764f6..9cd11b60 100644
--- a/boilerplate/cairo-boilerplate-glitz-wgl.c
+++ b/boilerplate/cairo-boilerplate-glitz-wgl.c
@@ -100,10 +100,10 @@ _cairo_boilerplate_glitz_wgl_create_surface_internal (glitz_format_name_t form
cairo_surface_t *
_cairo_boilerplate_glitz_wgl_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-pdf-private.h b/boilerplate/cairo-boilerplate-pdf-private.h
index 3c34c3ef..f4affe76 100644
--- a/boilerplate/cairo-boilerplate-pdf-private.h
+++ b/boilerplate/cairo-boilerplate-pdf-private.h
@@ -30,10 +30,10 @@
cairo_surface_t *
_cairo_boilerplate_pdf_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-pdf.c b/boilerplate/cairo-boilerplate-pdf.c
index c3289f8f..3ac380c2 100644
--- a/boilerplate/cairo-boilerplate-pdf.c
+++ b/boilerplate/cairo-boilerplate-pdf.c
@@ -51,10 +51,10 @@ typedef struct _pdf_target_closure
cairo_surface_t *
_cairo_boilerplate_pdf_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -69,8 +69,8 @@ _cairo_boilerplate_pdf_create_surface (const char *name,
*closure = ptc = xmalloc (sizeof (pdf_target_closure_t));
- ptc->width = width;
- ptc->height = height;
+ ptc->width = ceil (width);
+ ptc->height = ceil (height);
xasprintf (&ptc->filename, "%s.out.pdf", name);
xunlink (ptc->filename);
@@ -85,7 +85,7 @@ _cairo_boilerplate_pdf_create_surface (const char *name,
ptc->target = surface;
surface = cairo_surface_create_similar (ptc->target,
CAIRO_CONTENT_COLOR,
- width, height);
+ ptc->width, ptc->height);
if (cairo_surface_status (surface))
goto CLEANUP_TARGET;
} else {
diff --git a/boilerplate/cairo-boilerplate-ps-private.h b/boilerplate/cairo-boilerplate-ps-private.h
index b97c7db9..7bcce1c0 100644
--- a/boilerplate/cairo-boilerplate-ps-private.h
+++ b/boilerplate/cairo-boilerplate-ps-private.h
@@ -30,10 +30,10 @@
cairo_surface_t *
_cairo_boilerplate_ps2_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
@@ -41,10 +41,10 @@ _cairo_boilerplate_ps2_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_ps3_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-ps.c b/boilerplate/cairo-boilerplate-ps.c
index c3efceab..2fb03e89 100644
--- a/boilerplate/cairo-boilerplate-ps.c
+++ b/boilerplate/cairo-boilerplate-ps.c
@@ -68,10 +68,10 @@ static cairo_surface_t *
_cairo_boilerplate_ps_create_surface (const char *name,
cairo_content_t content,
cairo_ps_level_t level,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -90,8 +90,8 @@ _cairo_boilerplate_ps_create_surface (const char *name,
xunlink (ptc->filename);
ptc->level = level;
- ptc->width = width;
- ptc->height = height;
+ ptc->width = ceil (width);
+ ptc->height = ceil (height);
surface = cairo_ps_surface_create (ptc->filename, width, height);
if (cairo_surface_status (surface))
@@ -105,7 +105,7 @@ _cairo_boilerplate_ps_create_surface (const char *name,
ptc->target = surface;
surface = cairo_surface_create_similar (ptc->target,
CAIRO_CONTENT_COLOR,
- width, height);
+ ptc->width, ptc->height);
if (cairo_surface_status (surface))
goto CLEANUP_TARGET;
} else {
@@ -130,10 +130,10 @@ _cairo_boilerplate_ps_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_ps2_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -149,10 +149,10 @@ _cairo_boilerplate_ps2_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_ps3_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-qt-private.h b/boilerplate/cairo-boilerplate-qt-private.h
index 4ac87642..917d63b4 100644
--- a/boilerplate/cairo-boilerplate-qt-private.h
+++ b/boilerplate/cairo-boilerplate-qt-private.h
@@ -39,11 +39,11 @@ CAIRO_BEGIN_DECLS
extern cairo_surface_t *
_cairo_boilerplate_qt_create_surface (const char *name,
- cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ cairo_content_t content,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-qt.cpp b/boilerplate/cairo-boilerplate-qt.cpp
index 0e0aa7db..addcb12e 100644
--- a/boilerplate/cairo-boilerplate-qt.cpp
+++ b/boilerplate/cairo-boilerplate-qt.cpp
@@ -56,10 +56,10 @@ _cairo_boilerplate_qt_cleanup (void *closure)
cairo_surface_t *
_cairo_boilerplate_qt_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-quartz-private.h b/boilerplate/cairo-boilerplate-quartz-private.h
index 573e247e..ccf8a9ac 100644
--- a/boilerplate/cairo-boilerplate-quartz-private.h
+++ b/boilerplate/cairo-boilerplate-quartz-private.h
@@ -30,10 +30,10 @@
cairo_surface_t *
_cairo_boilerplate_quartz_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-quartz.c b/boilerplate/cairo-boilerplate-quartz.c
index 30652131..0b5b49d5 100644
--- a/boilerplate/cairo-boilerplate-quartz.c
+++ b/boilerplate/cairo-boilerplate-quartz.c
@@ -32,10 +32,10 @@
cairo_surface_t *
_cairo_boilerplate_quartz_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-script-private.h b/boilerplate/cairo-boilerplate-script-private.h
index 480e4221..ad01d629 100644
--- a/boilerplate/cairo-boilerplate-script-private.h
+++ b/boilerplate/cairo-boilerplate-script-private.h
@@ -30,10 +30,10 @@
cairo_surface_t *
_cairo_boilerplate_script_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-script.c b/boilerplate/cairo-boilerplate-script.c
index ae08cbc5..3d78078c 100644
--- a/boilerplate/cairo-boilerplate-script.c
+++ b/boilerplate/cairo-boilerplate-script.c
@@ -33,17 +33,17 @@ cairo_user_data_key_t script_closure_key;
typedef struct _script_target_closure {
char *filename;
- int width;
- int height;
+ double width;
+ double height;
} script_target_closure_t;
cairo_surface_t *
_cairo_boilerplate_script_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-svg-private.h b/boilerplate/cairo-boilerplate-svg-private.h
index d8c0a8fb..5a64eaf0 100644
--- a/boilerplate/cairo-boilerplate-svg-private.h
+++ b/boilerplate/cairo-boilerplate-svg-private.h
@@ -30,10 +30,10 @@
cairo_surface_t *
_cairo_boilerplate_svg11_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
@@ -41,10 +41,10 @@ _cairo_boilerplate_svg11_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_svg12_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-svg.c b/boilerplate/cairo-boilerplate-svg.c
index e6c1355f..407214c7 100644
--- a/boilerplate/cairo-boilerplate-svg.c
+++ b/boilerplate/cairo-boilerplate-svg.c
@@ -48,10 +48,10 @@ static cairo_surface_t *
_cairo_boilerplate_svg_create_surface (const char *name,
cairo_content_t content,
cairo_svg_version_t version,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -62,8 +62,8 @@ _cairo_boilerplate_svg_create_surface (const char *name,
*closure = ptc = xmalloc (sizeof (svg_target_closure_t));
- ptc->width = width;
- ptc->height = height;
+ ptc->width = ceil (width);
+ ptc->height = ceil (height);
xasprintf (&ptc->filename, "%s.out.svg", name);
xunlink (ptc->filename);
@@ -79,7 +79,7 @@ _cairo_boilerplate_svg_create_surface (const char *name,
ptc->target = surface;
surface = cairo_surface_create_similar (ptc->target,
CAIRO_CONTENT_COLOR,
- width, height);
+ ptc->width, ptc->height);
if (cairo_surface_status (surface))
goto CLEANUP_TARGET;
} else
@@ -103,10 +103,10 @@ _cairo_boilerplate_svg_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_svg11_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -123,10 +123,10 @@ _cairo_boilerplate_svg11_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_svg12_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-test-surfaces-private.h b/boilerplate/cairo-boilerplate-test-surfaces-private.h
index 55134fe5..57bf62dd 100644
--- a/boilerplate/cairo-boilerplate-test-surfaces-private.h
+++ b/boilerplate/cairo-boilerplate-test-surfaces-private.h
@@ -30,10 +30,10 @@
cairo_surface_t *
_cairo_boilerplate_test_fallback_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
@@ -41,10 +41,10 @@ _cairo_boilerplate_test_fallback_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_test_fallback16_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
@@ -53,10 +53,10 @@ _cairo_boilerplate_test_fallback16_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_test_meta_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
@@ -64,10 +64,10 @@ _cairo_boilerplate_test_meta_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_test_null_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
@@ -75,10 +75,10 @@ _cairo_boilerplate_test_null_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_test_paginated_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-test-surfaces.c b/boilerplate/cairo-boilerplate-test-surfaces.c
index 0fc92e3f..0fec3933 100644
--- a/boilerplate/cairo-boilerplate-test-surfaces.c
+++ b/boilerplate/cairo-boilerplate-test-surfaces.c
@@ -38,10 +38,10 @@
cairo_surface_t *
_cairo_boilerplate_test_fallback_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -53,10 +53,10 @@ _cairo_boilerplate_test_fallback_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_test_fallback16_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -68,10 +68,10 @@ _cairo_boilerplate_test_fallback16_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_test_meta_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -83,10 +83,10 @@ _cairo_boilerplate_test_meta_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_test_null_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -108,10 +108,10 @@ typedef struct {
cairo_surface_t *
_cairo_boilerplate_test_paginated_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-win32-printing.c b/boilerplate/cairo-boilerplate-win32-printing.c
index 13a65515..7a6dafc9 100644
--- a/boilerplate/cairo-boilerplate-win32-printing.c
+++ b/boilerplate/cairo-boilerplate-win32-printing.c
@@ -164,10 +164,10 @@ create_printer_dc (win32_target_closure_t *ptc)
cairo_surface_t *
_cairo_boilerplate_win32_printing_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-win32-private.h b/boilerplate/cairo-boilerplate-win32-private.h
index fc039ae7..b09b9f7f 100644
--- a/boilerplate/cairo-boilerplate-win32-private.h
+++ b/boilerplate/cairo-boilerplate-win32-private.h
@@ -30,10 +30,10 @@
cairo_surface_t *
_cairo_boilerplate_win32_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
@@ -41,10 +41,10 @@ _cairo_boilerplate_win32_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_win32_printing_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-win32.c b/boilerplate/cairo-boilerplate-win32.c
index 4b54a54e..83bc7c29 100644
--- a/boilerplate/cairo-boilerplate-win32.c
+++ b/boilerplate/cairo-boilerplate-win32.c
@@ -32,10 +32,10 @@
cairo_surface_t *
_cairo_boilerplate_win32_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-xcb-private.h b/boilerplate/cairo-boilerplate-xcb-private.h
index 998e6b9c..969b7614 100644
--- a/boilerplate/cairo-boilerplate-xcb-private.h
+++ b/boilerplate/cairo-boilerplate-xcb-private.h
@@ -30,10 +30,10 @@
cairo_surface_t *
_cairo_boilerplate_xcb_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-xcb.c b/boilerplate/cairo-boilerplate-xcb.c
index 306f874a..23e1b5ad 100644
--- a/boilerplate/cairo-boilerplate-xcb.c
+++ b/boilerplate/cairo-boilerplate-xcb.c
@@ -50,10 +50,10 @@ _cairo_boilerplate_xcb_synchronize (void *closure)
cairo_surface_t *
_cairo_boilerplate_xcb_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
diff --git a/boilerplate/cairo-boilerplate-xlib-private.h b/boilerplate/cairo-boilerplate-xlib-private.h
index 265ee97c..e4f24ce1 100644
--- a/boilerplate/cairo-boilerplate-xlib-private.h
+++ b/boilerplate/cairo-boilerplate-xlib-private.h
@@ -31,10 +31,10 @@
cairo_surface_t *
_cairo_boilerplate_xlib_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
@@ -43,10 +43,10 @@ _cairo_boilerplate_xlib_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_xlib_reference_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
@@ -54,10 +54,10 @@ _cairo_boilerplate_xlib_reference_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_xlib_fallback_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
diff --git a/boilerplate/cairo-boilerplate-xlib.c b/boilerplate/cairo-boilerplate-xlib.c
index 03febe90..f40f9271 100644
--- a/boilerplate/cairo-boilerplate-xlib.c
+++ b/boilerplate/cairo-boilerplate-xlib.c
@@ -188,10 +188,10 @@ _cairo_boilerplate_xlib_perf_create_surface (Display *dpy,
cairo_surface_t *
_cairo_boilerplate_xlib_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -202,9 +202,12 @@ _cairo_boilerplate_xlib_create_surface (const char *name,
*closure = xtc = xcalloc (1, sizeof (xlib_target_closure_t));
- if (width == 0)
+ width = ceil (width);
+ if (width < 1)
width = 1;
- if (height == 0)
+
+ height = ceil (height);
+ if (height < 1)
height = 1;
xtc->dpy = dpy = XOpenDisplay (NULL);
@@ -228,10 +231,10 @@ _cairo_boilerplate_xlib_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_xlib_reference_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -253,9 +256,12 @@ _cairo_boilerplate_xlib_reference_create_surface (const char *name,
*closure = xtc = xcalloc (1, sizeof (xlib_target_closure_t));
- if (width == 0)
+ width = ceil (width);
+ if (width < 1)
width = 1;
- if (height == 0)
+
+ height = ceil (height);
+ if (height < 1)
height = 1;
xtc->dpy = dpy = XOpenDisplay (display);
@@ -289,10 +295,10 @@ _cairo_boilerplate_xlib_reference_create_surface (const char *name,
cairo_surface_t *
_cairo_boilerplate_xlib_fallback_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -316,9 +322,12 @@ _cairo_boilerplate_xlib_fallback_create_surface (const char *name,
*closure = xtc = xmalloc (sizeof (xlib_target_closure_t));
- if (width == 0)
+ width = ceil (width);
+ if (width < 1)
width = 1;
- if (height == 0)
+
+ height = ceil (height);
+ if (height < 1)
height = 1;
xtc->dpy = dpy = XOpenDisplay (NULL);
diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c
index 39a1a4a9..0ab45ee0 100644
--- a/boilerplate/cairo-boilerplate.c
+++ b/boilerplate/cairo-boilerplate.c
@@ -141,10 +141,10 @@ cairo_boilerplate_format_from_content (cairo_content_t content)
static cairo_surface_t *
_cairo_boilerplate_image_create_surface (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
@@ -162,7 +162,7 @@ _cairo_boilerplate_image_create_surface (const char *name,
return NULL;
}
- return cairo_image_surface_create (format, width, height);
+ return cairo_image_surface_create (format, ceil (width), ceil (height));
}
cairo_surface_t *
diff --git a/boilerplate/cairo-boilerplate.h b/boilerplate/cairo-boilerplate.h
index 99dc5ceb..626ee2eb 100644
--- a/boilerplate/cairo-boilerplate.h
+++ b/boilerplate/cairo-boilerplate.h
@@ -116,10 +116,10 @@ typedef enum {
typedef cairo_surface_t *
(*cairo_boilerplate_create_surface_t) (const char *name,
cairo_content_t content,
- int width,
- int height,
- int max_width,
- int max_height,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);