diff options
-rw-r--r-- | gs/base/gsptype1.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gs/base/gsptype1.c b/gs/base/gsptype1.c index cc9da5aec..35292efd9 100644 --- a/gs/base/gsptype1.c +++ b/gs/base/gsptype1.c | |||
@@ -455,8 +455,15 @@ compute_inst_matrix(gs_pattern1_instance_t * pinst, gs_state * saved, | |||
455 | pbbox->p.y -= dy; | 455 | pbbox->p.y -= dy; |
456 | pbbox->q.x -= dx; | 456 | pbbox->q.x -= dx; |
457 | pbbox->q.y -= dy; | 457 | pbbox->q.y -= dy; |
458 | code = gx_translate_to_fixed(saved, float2fixed_rounded(saved->ctm.tx - dx), | 458 | if (saved->ctm.txy_fixed_valid) { |
459 | float2fixed_rounded(saved->ctm.ty - dy)); | 459 | code = gx_translate_to_fixed(saved, float2fixed_rounded(saved->ctm.tx - dx), |
460 | float2fixed_rounded(saved->ctm.ty - dy)); | ||
461 | } else { /* the ctm didn't fit in a fixed. Just adjust the float values */ | ||
462 | saved->ctm.tx -= dx; | ||
463 | saved->ctm.ty -= dy; | ||
464 | /* not sure if this is needed for patterns, but lifted from gx_translate_to_fixed */ | ||
465 | code = gx_path_translate(saved->path, float2fixed(-dx), float2fixed(-dy)); | ||
466 | } | ||
460 | if (code < 0) | 467 | if (code < 0) |
461 | return code; | 468 | return code; |
462 | 469 | ||