[WIP] GraphicsView: Add General_polygon_2 to QPainterPath converter. … #2059
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes
This adds a converter function to convert from General_polygon_2 to QPainterPath.
I couldn't get the template parameter right, eg, express the CGAL::General_polygon_2 concept that depends on the class template parameter K, without having to include
CGAL/General_polygon_2.h
directly.I have tried to define it with:
And using it this way:
I have tried other ways to define it, but in the best case, I always ended up with errors along
"
template argument deduction/substitution failed
". The only other way around was to call the converter this wayconvert.operator()<...>();
But I think this defeat the purpose of the functor approach of the converter...I've marked this PR as 'WIP', as I am not sure how to solve this extra template parameter.
As well, do you want me to add an example code to the GraphicsView module? Eg, export to image (PNG), or maybe export to SVG?
Release Management