Skip to content
  • Michael Natterer's avatar
    added new function gimp_drawable_get_sub_preview() which returns a scaled · 4714802a
    Michael Natterer authored
    2004-12-11  Michael Natterer  <mitch@gimp.org>
    
    	* app/core/gimpdrawable-preview.[ch]: added new function
    	gimp_drawable_get_sub_preview() which returns a scaled preview of
    	a part of a drawable.
    
    	(gimp_drawable_preview_scale): made it work with srcPR.x and
    	srcPR.y being != 0.
    
    	* app/core/gimpimage-preview.c (gimp_image_get_new_preview)
    	* app/widgets/gimpviewrendererdrawable.c
    	(gimp_view_renderer_drawable_render): if the area of the drawable
    	preview is more than 4 times larger than the drawable itself (evil
    	heuristic, but seems to work fine), use above function to get a
    	sub-preview of the drawable instead of getting an insanely large
    	preview of the whole drawable just to use a small part of it.
    	Fixes bug #142074.
    
    	* app/core/gimpimage-preview.c (gimp_image_get_new_preview):
    	optimized by skipping layers which do not intersect with the
    	canvas.
    4714802a