1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00
Files
godot/thirdparty/msdfgen/core/Contour.h
Rémi Verschelde 76dda1f2c8 msdfgen: Update to 1.13
Remove unused `export-svg` and `save-*` files.
2025-12-12 22:39:53 +01:00

35 lines
1012 B
C++

#pragma once
#include <vector>
#include "EdgeHolder.h"
namespace msdfgen {
/// A single closed contour of a shape.
class Contour {
public:
/// The sequence of edges that make up the contour.
std::vector<EdgeHolder> edges;
/// Adds an edge to the contour.
void addEdge(const EdgeHolder &edge);
#ifdef MSDFGEN_USE_CPP11
void addEdge(EdgeHolder &&edge);
#endif
/// Creates a new edge in the contour and returns its reference.
EdgeHolder &addEdge();
/// Adjusts the bounding box to fit the contour.
void bound(double &xMin, double &yMin, double &xMax, double &yMax) const;
/// Adjusts the bounding box to fit the contour border's mitered corners.
void boundMiters(double &xMin, double &yMin, double &xMax, double &yMax, double border, double miterLimit, int polarity) const;
/// Computes the winding of the contour. Returns 1 if positive, -1 if negative.
int winding() const;
/// Reverses the sequence of edges on the contour.
void reverse();
};
}