diff --git a/core/msdfgen-c.cpp b/core/msdfgen-c.cpp index 9b802c4..708eaba 100644 --- a/core/msdfgen-c.cpp +++ b/core/msdfgen-c.cpp @@ -281,6 +281,11 @@ MSDF_API int msdf_shape_bound_miters(msdf_shape_const_handle shape, return MSDF_SUCCESS; } +MSDF_API int msdf_shape_orient_contours(msdf_shape_handle shape) { + reinterpret_cast(shape)->orientContours(); + return MSDF_SUCCESS; +} + MSDF_API void msdf_shape_free(msdf_shape_handle shape) { msdf_delete(reinterpret_cast(shape)); } diff --git a/msdfgen-c.h b/msdfgen-c.h index 67ab638..65461f0 100644 --- a/msdfgen-c.h +++ b/msdfgen-c.h @@ -292,6 +292,12 @@ MSDF_API int msdf_shape_bound(msdf_shape_const_handle shape, msdf_bounds_t* boun */ MSDF_API int msdf_shape_bound_miters(msdf_shape_const_handle shape, msdf_bounds_t* bounds, double border, double miter_limit, int polarity); +/** + * Orients all contours associated with the given shape before rendering. + * @param shape A pointer to a shape whose contours to orient. + */ +MSDF_API int msdf_shape_orient_contours(msdf_shape_handle shape); + /** * Calls the destructor of the given bitmap and frees its memory using the * internal allocator.