mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-24 17:09:43 +00:00 
			
		
		
		
	This one requires drawing to the canvas, so it doesn't make so much sense to move the implementation over.
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			559 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			559 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| namespace Web::HTML {
 | |
| 
 | |
| // https://html.spec.whatwg.org/multipage/canvas.html#canvasrect
 | |
| class CanvasRect {
 | |
| public:
 | |
|     virtual ~CanvasRect() = default;
 | |
| 
 | |
|     virtual void fill_rect(float x, float y, float width, float height) = 0;
 | |
|     virtual void stroke_rect(float x, float y, float width, float height) = 0;
 | |
|     virtual void clear_rect(float x, float y, float width, float height) = 0;
 | |
| 
 | |
| protected:
 | |
|     CanvasRect() = default;
 | |
| };
 | |
| 
 | |
| }
 |