initial commit, 4.5 stable
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
This commit is contained in:
41
thirdparty/msdfgen/core/EdgeHolder.h
vendored
Normal file
41
thirdparty/msdfgen/core/EdgeHolder.h
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
#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);
|
||||
|
||||
inline EdgeHolder() : edgeSegment() { }
|
||||
inline EdgeHolder(EdgeSegment *segment) : edgeSegment(segment) { }
|
||||
inline EdgeHolder(Point2 p0, Point2 p1, EdgeColor edgeColor = WHITE) : edgeSegment(EdgeSegment::create(p0, p1, edgeColor)) { }
|
||||
inline EdgeHolder(Point2 p0, Point2 p1, Point2 p2, EdgeColor edgeColor = WHITE) : edgeSegment(EdgeSegment::create(p0, p1, p2, edgeColor)) { }
|
||||
inline EdgeHolder(Point2 p0, Point2 p1, Point2 p2, Point2 p3, EdgeColor edgeColor = WHITE) : edgeSegment(EdgeSegment::create(p0, p1, p2, p3, edgeColor)) { }
|
||||
EdgeHolder(const EdgeHolder &orig);
|
||||
#ifdef MSDFGEN_USE_CPP11
|
||||
EdgeHolder(EdgeHolder &&orig);
|
||||
#endif
|
||||
~EdgeHolder();
|
||||
EdgeHolder &operator=(const EdgeHolder &orig);
|
||||
#ifdef MSDFGEN_USE_CPP11
|
||||
EdgeHolder &operator=(EdgeHolder &&orig);
|
||||
#endif
|
||||
EdgeSegment &operator*();
|
||||
const EdgeSegment &operator*() const;
|
||||
EdgeSegment *operator->();
|
||||
const EdgeSegment *operator->() const;
|
||||
operator EdgeSegment *();
|
||||
operator const EdgeSegment *() const;
|
||||
|
||||
private:
|
||||
EdgeSegment *edgeSegment;
|
||||
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user