From cd351298012834f54903019869af0ea8754f69fb Mon Sep 17 00:00:00 2001 From: yixy <34703796+yixy-only@users.noreply.github.com> Date: Thu, 4 Jul 2024 19:38:40 +0800 Subject: [PATCH] =?UTF-8?q?adjust:=20ege=5Fpath=5Faddstring=20=E9=87=8D?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E4=B8=BA=20ege=5Fpath=5Faddtext=20(#209)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/ege.h | 4 ++-- src/egegapi.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/ege.h b/include/ege.h index 3ceb9a4..9c18086 100644 --- a/include/ege.h +++ b/include/ege.h @@ -1172,8 +1172,8 @@ void EGEAPI ege_path_addcircle (ege_path* path, float x, float y, float radi void EGEAPI ege_path_addrect (ege_path* path, float x, float y, float width, float height); void EGEAPI ege_path_addellipse (ege_path* path, float x, float y, float width, float height); void EGEAPI ege_path_addpie (ege_path* path, float x, float y, float width, float height, float startAngle, float sweepAngle); -void EGEAPI ege_path_addstring (ege_path* path, float x, float y, const char* text, float height, int length = -1, const char* typeface = NULL, int fontStyle = 0); -void EGEAPI ege_path_addstring (ege_path* path, float x, float y, const wchar_t* text, float height, int length = -1, const wchar_t* typeface = NULL, int fontStyle = 0); +void EGEAPI ege_path_addtext (ege_path* path, float x, float y, const char* text, float height, int length = -1, const char* typeface = NULL, int fontStyle = 0); +void EGEAPI ege_path_addtext (ege_path* path, float x, float y, const wchar_t* text, float height, int length = -1, const wchar_t* typeface = NULL, int fontStyle = 0); void EGEAPI ege_path_addpolygon (ege_path* path, int numOfPoints, const ege_point* points); void EGEAPI ege_path_addclosedcurve(ege_path* path, int numOfPoints, const ege_point* points); void EGEAPI ege_path_addclosedcurve(ege_path* path, int numOfPoints, const ege_point* points, float tension); diff --git a/src/egegapi.cpp b/src/egegapi.cpp index fc8509c..4418b7d 100644 --- a/src/egegapi.cpp +++ b/src/egegapi.cpp @@ -2680,13 +2680,13 @@ void ege_path_addpie(ege_path* path, float x, float y, float width, float height } } -void ege_path_addstring(ege_path* path, float x, float y, const char* text, float height, int length, +void ege_path_addtext(ege_path* path, float x, float y, const char* text, float height, int length, const char* typeface, int fontStyle) { - ege_path_addstring(path, x, y, mb2w(text).c_str(), height, length, mb2w(typeface).c_str(), fontStyle); + ege_path_addtext(path, x, y, mb2w(text).c_str(), height, length, mb2w(typeface).c_str(), fontStyle); } -void ege_path_addstring(ege_path* path, float x, float y, const wchar_t* text, float height, int length, +void ege_path_addtext(ege_path* path, float x, float y, const wchar_t* text, float height, int length, const wchar_t* typeface, int fontStyle) { if ((path != NULL) && (text != NULL) && (length != 0)) {