color从字符串初始化,在CMake中添加资源文件

This commit is contained in:
daiqingshuang
2025-04-07 17:32:12 +08:00
parent 1c3aee5ca1
commit fe1ca8998c
11 changed files with 304 additions and 112 deletions

View File

@@ -11,6 +11,10 @@
int main(int argc, char* argv[]) {
mirage_app::get().init();
auto c1 = linear_color::from_string("#FF0000");
auto c2 = linear_color::from_string("rgb(255, 0, 0)");
auto c3 = linear_color::from_string("rgba(255, 0, 0, 255)");
auto& manager = font_manager::instance();
manager.add_font(L"C:/Users/46944/AppData/Local/Microsoft/Windows/Fonts/MapleMono-NF-CN-Regular.ttf");
manager.add_font(L"C:/Windows/Fonts/msyh.ttc");