summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-03-21 12:37:04 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-03-22 10:43:05 -0400
commit126f85535f72dbe7fccf9b1a32994727a90ffa3d (patch)
treec09750aeaaeb7054929ad0bbc799411579bed09b
parentec323d222cbf8fff30871d79455c88c7096b111e (diff)
window.c: Fix the stretch scaling code
-rw-r--r--clients/cairo-util.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/clients/cairo-util.c b/clients/cairo-util.c
index 09dd06e5..b91fd1f2 100644
--- a/clients/cairo-util.c
+++ b/clients/cairo-util.c
@@ -165,8 +165,8 @@ tile_mask(cairo_t *cr, cairo_surface_t *surface,
}
/* Top stretch */
- cairo_matrix_init_translate(&matrix, 64, 0);
- cairo_matrix_scale(&matrix, 64.0 / width, 1);
+ cairo_matrix_init_translate(&matrix, 60, 0);
+ cairo_matrix_scale(&matrix, 8.0 / width, 1);
cairo_matrix_translate(&matrix, -x - width / 2, -y);
cairo_pattern_set_matrix(pattern, &matrix);
cairo_rectangle(cr, x + margin, y, width - 2 * margin, margin);
@@ -190,8 +190,8 @@ tile_mask(cairo_t *cr, cairo_surface_t *surface,
cairo_mask(cr, pattern);
/* Left stretch */
- cairo_matrix_init_translate(&matrix, 0, 64);
- cairo_matrix_scale(&matrix, 1, 64.0 / height);
+ cairo_matrix_init_translate(&matrix, 0, 60);
+ cairo_matrix_scale(&matrix, 1, 8.0 / height);
cairo_matrix_translate(&matrix, -x, -y - height / 2);
cairo_pattern_set_matrix(pattern, &matrix);
cairo_reset_clip(cr);
@@ -247,8 +247,8 @@ tile_source(cairo_t *cr, cairo_surface_t *surface,
}
/* Top stretch */
- cairo_matrix_init_translate(&matrix, 64, 0);
- cairo_matrix_scale(&matrix, 64.0 / (width - 2 * margin), 1);
+ cairo_matrix_init_translate(&matrix, 60, 0);
+ cairo_matrix_scale(&matrix, 8.0 / (width - 2 * margin), 1);
cairo_matrix_translate(&matrix, -x - width / 2, -y);
cairo_pattern_set_matrix(pattern, &matrix);
cairo_rectangle(cr, x + margin, y, width - 2 * margin, top_margin);
@@ -262,8 +262,8 @@ tile_source(cairo_t *cr, cairo_surface_t *surface,
cairo_fill(cr);
/* Left stretch */
- cairo_matrix_init_translate(&matrix, 0, 64);
- cairo_matrix_scale(&matrix, 1, 64.0 / (height - margin - top_margin));
+ cairo_matrix_init_translate(&matrix, 0, 60);
+ cairo_matrix_scale(&matrix, 1, 8.0 / (height - margin - top_margin));
cairo_matrix_translate(&matrix, -x, -y - height / 2);
cairo_pattern_set_matrix(pattern, &matrix);
cairo_rectangle(cr, x, y + top_margin,