sammycage / lunasvg

lunasvg is a standalone SVG rendering library in C++
MIT License
818 stars 115 forks source link

Create folder containing C++ version of plutovg #155

Closed Randalphwa closed 5 months ago

Randalphwa commented 5 months ago

This creates a plutovg subdirectory under sources\ which contains a version of plutovg ported from C to C++.

Notes

I have not added or modified any CMakeLists.txt files at this point. I've tested it in a private app where I simply added all of the sources (lunasvg and plutovg) to the app's CMakeLists.txt file.

plutovg_path_add_path -- currently I just iterate through the additional path, adding each element to the path, letting std::vector handle additional memory allocation as needed. An alternative would be to reserve the additional amount and use memcpy to copy the additional items.

plutovg_rle_t::spans and plutovg_gradient::stops could theoretically be converted to std::vector as well, replacing the calls to realloc/free used with them.

sammycage commented 5 months ago

@Randalphwa Firstly, apologies for the delay in responding to your pull request. Your efforts are truly appreciated.

After thorough consideration, we regret to inform you that we cannot accept this pull request. The primary reason is that plutovg is a "separate library", and accepting this would result in maintaining two separate libraries, which could be challenging for future updates and maintenance.

We truly appreciate your contribution and encourage you to continue your valuable work.

Randalphwa commented 5 months ago

That makes sense, thanks for letting me know. wxWidgets does build some C libraries as well, so I'll add the plutovg part of your repository as a C library, and the C++ portion will be added to the core wxWidgets library.