Skip to content

Issue #6735: Scale pattern previews to show full pattern

Alx Sa requested to merge alxsa-scale-pattern-preview into master

This patch attempts to resolve issue #6735 (closed).

Currently, pattern previews load the image as-is without scaling to fit the box. This means that (for example) if your pattern is 256x256 and your preview is set to 64x64, you only see the top-left corner of the pattern in the preview.

This code checks if the pattern dimensions are larger than the preview window size. If so, gegl_buffer_get ()'s scale parameter is set to the appropriate value and the full (scaled down) pattern is now visible. This behavior is referenced from the GimpBrush preview code, although the implementation is different.

The code is identical in gimp-2-10, so if accepted this should be easy to backport.

Merge request reports