mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 11:47:59 +02:00
[meta-surface] Adjust tolerance when replaying to surfaces with device scale
such that we get a consistent look with different fallback resolutions.
This commit is contained in:
parent
4270cd3358
commit
7f21bfb0a8
1 changed files with 6 additions and 5 deletions
|
|
@ -667,6 +667,7 @@ _cairo_meta_surface_replay_internal (cairo_surface_t *surface,
|
|||
cairo_bool_t has_device_transform = _cairo_surface_has_device_transform (target);
|
||||
cairo_matrix_t *device_transform = &target->device_transform;
|
||||
cairo_path_fixed_t path_copy, *dev_path;
|
||||
double tolerance_multiplier = _cairo_matrix_transformed_circle_major_axis (device_transform, 1.0);
|
||||
|
||||
if (surface->status)
|
||||
return surface->status;
|
||||
|
|
@ -739,7 +740,7 @@ _cairo_meta_surface_replay_internal (cairo_surface_t *surface,
|
|||
&command->stroke.style,
|
||||
&dev_ctm,
|
||||
&dev_ctm_inverse,
|
||||
command->stroke.tolerance,
|
||||
command->stroke.tolerance * tolerance_multiplier,
|
||||
command->stroke.antialias);
|
||||
break;
|
||||
}
|
||||
|
|
@ -771,7 +772,7 @@ _cairo_meta_surface_replay_internal (cairo_surface_t *surface,
|
|||
command->fill.op,
|
||||
&command->fill.source.base,
|
||||
command->fill.fill_rule,
|
||||
command->fill.tolerance,
|
||||
command->fill.tolerance * tolerance_multiplier,
|
||||
command->fill.antialias,
|
||||
dev_path,
|
||||
stroke_command->stroke.op,
|
||||
|
|
@ -779,7 +780,7 @@ _cairo_meta_surface_replay_internal (cairo_surface_t *surface,
|
|||
&stroke_command->stroke.style,
|
||||
&dev_ctm,
|
||||
&dev_ctm_inverse,
|
||||
stroke_command->stroke.tolerance,
|
||||
stroke_command->stroke.tolerance * tolerance_multiplier,
|
||||
stroke_command->stroke.antialias);
|
||||
i++;
|
||||
} else
|
||||
|
|
@ -788,7 +789,7 @@ _cairo_meta_surface_replay_internal (cairo_surface_t *surface,
|
|||
&command->fill.source.base,
|
||||
dev_path,
|
||||
command->fill.fill_rule,
|
||||
command->fill.tolerance,
|
||||
command->fill.tolerance * tolerance_multiplier,
|
||||
command->fill.antialias);
|
||||
break;
|
||||
}
|
||||
|
|
@ -831,7 +832,7 @@ _cairo_meta_surface_replay_internal (cairo_surface_t *surface,
|
|||
else
|
||||
status = _cairo_clip_clip (&clip, dev_path,
|
||||
command->intersect_clip_path.fill_rule,
|
||||
command->intersect_clip_path.tolerance,
|
||||
command->intersect_clip_path.tolerance * tolerance_multiplier,
|
||||
command->intersect_clip_path.antialias,
|
||||
target);
|
||||
assert (status == 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue