Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create folder containing C++ version of plutovg #155

Closed
wants to merge 2 commits into from

Conversation

Randalphwa
Copy link

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.

MSVC 17.7 compiled these without a problem, however on Ubuntu using
gcc 11.04, the additional #includes is required.
@sammycage
Copy link
Owner

sammycage commented Feb 5, 2024

@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
Copy link
Author

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.

@Randalphwa Randalphwa closed this Feb 5, 2024
@Randalphwa Randalphwa deleted the plutovg_cpp branch February 5, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants