mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:22:46 +00:00 
			
		
		
		
	 04cc837db9
			
		
	
	
		04cc837db9
		
	
	
	
	
		
			
			These two were called by Discord while loading: - float getTotalLength(); - DOMPoint getPointAtLength(float distance);
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			775 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			775 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibWeb/Geometry/DOMPoint.h>
 | |
| #include <LibWeb/SVG/SVGGraphicsElement.h>
 | |
| 
 | |
| namespace Web::SVG {
 | |
| 
 | |
| // https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement
 | |
| class SVGGeometryElement : public SVGGraphicsElement {
 | |
| public:
 | |
|     using WrapperType = Bindings::SVGGeometryElementWrapper;
 | |
| 
 | |
|     virtual RefPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
 | |
| 
 | |
|     virtual Gfx::Path& get_path() = 0;
 | |
| 
 | |
|     float get_total_length();
 | |
|     NonnullRefPtr<Geometry::DOMPoint> get_point_at_length(float distance);
 | |
| 
 | |
| protected:
 | |
|     SVGGeometryElement(DOM::Document& document, DOM::QualifiedName qualified_name);
 | |
| };
 | |
| 
 | |
| }
 |