2020-12-27 13:30:33 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "edge-segments.h"
|
|
|
|
|
|
|
|
namespace msdfgen {
|
|
|
|
|
|
|
|
/// Container for a single edge of dynamic type.
|
|
|
|
class EdgeHolder {
|
|
|
|
|
|
|
|
public:
|
|
|
|
/// Swaps the edges held by a and b.
|
|
|
|
static void swap(EdgeHolder &a, EdgeHolder &b);
|
|
|
|
|
|
|
|
EdgeHolder();
|
|
|
|
EdgeHolder(EdgeSegment *segment);
|
|
|
|
EdgeHolder(Point2 p0, Point2 p1, EdgeColor edgeColor = WHITE);
|
|
|
|
EdgeHolder(Point2 p0, Point2 p1, Point2 p2, EdgeColor edgeColor = WHITE);
|
|
|
|
EdgeHolder(Point2 p0, Point2 p1, Point2 p2, Point2 p3, EdgeColor edgeColor = WHITE);
|
|
|
|
EdgeHolder(const EdgeHolder &orig);
|
|
|
|
#ifdef MSDFGEN_USE_CPP11
|
|
|
|
EdgeHolder(EdgeHolder &&orig);
|
|
|
|
#endif
|
|
|
|
~EdgeHolder();
|
2024-03-12 08:26:55 +00:00
|
|
|
EdgeHolder &operator=(const EdgeHolder &orig);
|
2020-12-27 13:30:33 +00:00
|
|
|
#ifdef MSDFGEN_USE_CPP11
|
2024-03-12 08:26:55 +00:00
|
|
|
EdgeHolder &operator=(EdgeHolder &&orig);
|
2020-12-27 13:30:33 +00:00
|
|
|
#endif
|
2024-03-12 08:26:55 +00:00
|
|
|
EdgeSegment &operator*();
|
|
|
|
const EdgeSegment &operator*() const;
|
|
|
|
EdgeSegment *operator->();
|
|
|
|
const EdgeSegment *operator->() const;
|
2020-12-27 13:30:33 +00:00
|
|
|
operator EdgeSegment *();
|
|
|
|
operator const EdgeSegment *() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
EdgeSegment *edgeSegment;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|