mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-04 07:10:57 +00:00 
			
		
		
		
	We now select between nearest neighbor and bilinear filtering when scaling images in CRC2D.drawImage(). This patch also adds CRC2D.imageSmoothingQuality but it's ignored for now as we don't have a bunch of different quality levels to map it to. Work towards #17993 (Ruffle Flash Player)
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			675 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			675 B
		
	
	
	
		
			C++
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
 | 
						|
 *
 | 
						|
 * SPDX-License-Identifier: BSD-2-Clause
 | 
						|
 */
 | 
						|
 | 
						|
#pragma once
 | 
						|
 | 
						|
#include <LibWeb/HTML/ImageData.h>
 | 
						|
 | 
						|
namespace Web::HTML {
 | 
						|
 | 
						|
// https://html.spec.whatwg.org/multipage/canvas.html#canvasimagesmoothing
 | 
						|
class CanvasImageSmoothing {
 | 
						|
public:
 | 
						|
    virtual ~CanvasImageSmoothing() = default;
 | 
						|
 | 
						|
    virtual bool image_smoothing_enabled() const = 0;
 | 
						|
    virtual void set_image_smoothing_enabled(bool) = 0;
 | 
						|
    virtual Bindings::ImageSmoothingQuality image_smoothing_quality() const = 0;
 | 
						|
    virtual void set_image_smoothing_quality(Bindings::ImageSmoothingQuality) = 0;
 | 
						|
 | 
						|
protected:
 | 
						|
    CanvasImageSmoothing() = default;
 | 
						|
};
 | 
						|
 | 
						|
}
 |