Skip to content

Commit

Permalink
adjust: ege_path_addstring 重命名为 ege_path_addtext (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
yixy-only authored Jul 4, 2024
1 parent 4d4e7f3 commit cd35129
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/ege.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/egegapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit cd35129

Please sign in to comment.