diff options
author | Martin Capitanio <capnm@capitanio.org> | 2023-05-11 17:39:50 +0200 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2023-05-12 12:31:23 +0200 |
commit | 9e11b78d1cb6718fa8357be3b3f4b8bdadd6b660 (patch) | |
tree | 7245ce16b8f3769b9126a180db7cf961a3855650 /thirdparty/thorvg/src/lib/tvgCommon.h | |
parent | ce0c61b6e33807bd9868ff3fe18ffac737a1c55d (diff) |
Update ThorVG to v0.9.0
https://github.com/thorvg/thorvg/releases/tag/v0.9.0
Fixes #72478
(cherry picked from commit 5db751832d54092c9d153c0fe07f9cc4616a2d01)
Diffstat (limited to 'thirdparty/thorvg/src/lib/tvgCommon.h')
-rw-r--r-- | thirdparty/thorvg/src/lib/tvgCommon.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/thirdparty/thorvg/src/lib/tvgCommon.h b/thirdparty/thorvg/src/lib/tvgCommon.h index 1d66f2e1a2..1731647c00 100644 --- a/thirdparty/thorvg/src/lib/tvgCommon.h +++ b/thirdparty/thorvg/src/lib/tvgCommon.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 - 2022 Samsung Electronics Co., Ltd. All rights reserved. + * Copyright (c) 2020 - 2023 the ThorVG project. All rights reserved. * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,6 +19,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ + #ifndef _TVG_COMMON_H_ #define _TVG_COMMON_H_ @@ -64,8 +65,14 @@ using namespace tvg; enum class FileType { Tvg = 0, Svg, Raw, Png, Jpg, Unknown }; #ifdef THORVG_LOG_ENABLED - #define TVGLOG(tag, fmt, ...) fprintf(stdout, tag ": " fmt "\n", ##__VA_ARGS__) //Log Message for notifying user some useful info - #define TVGERR(tag, fmt, ...) fprintf(stderr, tag ": " fmt "\n", ##__VA_ARGS__) //Error Message for us to fix it + constexpr auto ErrorColor = "\033[31m"; //red + constexpr auto ErrorBgColor = "\033[41m";//bg red + constexpr auto LogColor = "\033[32m"; //green + constexpr auto LogBgColor = "\033[42m"; //bg green + constexpr auto GreyColor = "\033[90m"; //grey + constexpr auto ResetColors = "\033[0m"; //default + #define TVGERR(tag, fmt, ...) fprintf(stderr, "%s[E]%s %s" tag "%s (%s %d): %s" fmt "\n", ErrorBgColor, ResetColors, ErrorColor, GreyColor, __FILE__, __LINE__, ResetColors, ##__VA_ARGS__) + #define TVGLOG(tag, fmt, ...) fprintf(stdout, "%s[L]%s %s" tag "%s (%s %d): %s" fmt "\n", LogBgColor, ResetColors, LogColor, GreyColor, __FILE__, __LINE__, ResetColors, ##__VA_ARGS__) #else #define TVGERR(...) #define TVGLOG(...) |