增加CoordinateSystem2DName和GetCoordinateSystem2DName

This commit is contained in:
hyzboy 2025-06-11 01:10:15 +08:00
parent 3057fc7b6f
commit 0c3cc5a320

View File

@ -11,4 +11,18 @@ namespace hgl::graph
ENUM_CLASS_RANGE(NDC,Ortho) ENUM_CLASS_RANGE(NDC,Ortho)
}; };
constexpr const char *CoordinateSystem2DName[]=
{
"NDC",
"0to1",
"Ortho"
};
inline const char *GetCoordinateSystem2DName(const enum class CoordinateSystem2D &cs)
{
RANGE_CHECK_RETURN_NULLPTR(cs)
return CoordinateSystem2DName[size_t(cs)];
}
}//namespace hgl::graph }//namespace hgl::graph