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.
I want to give vips a spin on my project, so I'm doing my best to implement missing functionality.
This PR introduces all shape variants. After previous attempts I have decided to go with creating string with correct SVG representation of shape to be created and use vips to import it and composite over original image.
It gives the same or even nicer results than draw_* results while being way simpler and less "hacky" (creating ellipses or polygons with arbitrary border width would be a nightmare in pure vips).
[OUTDATED - original description]
This PR introduces simple RectangleShape, EllipseShape and CircleShape.
I'm afraid remaining shapes will not be as easy as those because I see no way to control border width in vips. I'm torn between trying to implement them correctly (that would probably be difficult and complex in case of Polygon and Line) or implementing them with only support for single pixel border, ignoring this attribute at all.