diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-03-29 01:56:27 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-03-29 01:56:27 +0200 |
commit | 49b5087171894c97168b44b04c9d9b1f6d8f7df8 (patch) | |
tree | 0adea50738b02b5fae4b6c54e2aa10bf0fff93e4 | |
parent | afde83ac20c0f2395708bfa8fda9fb287bb73cb0 (diff) | |
download | mupdf-49b5087171894c97168b44b04c9d9b1f6d8f7df8.tar.xz |
xps: Rudimentary support for tiling with fixed number of repeats.
-rw-r--r-- | xps/xpstile.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/xps/xpstile.c b/xps/xpstile.c index e6bcb8cf..89db1e37 100644 --- a/xps/xpstile.c +++ b/xps/xpstile.c @@ -159,9 +159,20 @@ xps_parse_tiling_brush(xps_context_t *ctx, fz_matrix ctm, if (tile_mode != TILE_NONE) { + float w = viewbox.x1 - viewbox.x0; + float h = viewbox.y1 - viewbox.y0; + fz_matrix ttm; + int x, y; + /* TODO: loop in visible area */ - fz_warn("tiling brushes not implemented!"); - xps_paint_tiling_brush(ctx, ctm, viewbox, tile_mode, &c); + for (y = -10; y < 20; y++) + { + for (x = -10; x < 20; x++) + { + ttm = fz_concat(fz_translate(w*x, h*y), ctm); + xps_paint_tiling_brush(ctx, ttm, viewbox, tile_mode, &c); + } + } } else { |