05-18-2021, 01:12 PM
Hi,
Our image generation code has undergone some changes in preparation for the upcoming Ludii web player and reflection was one of the casualties.
We've written our own SVG rendering code that reads the *.svg file for each piece, manipulates the colours according to its owner, then renders the shapes to a BufferedImage image suitable for all platforms. Any transforms have to be applied during the render; rotation is not a problem but having to reflect a rotated image during rendering, while juggling between coordinate systems, became too much of a headache (note that we don't support SVG transforms, any transformation has to be manually applied). It's doable but will require our SVG rendering code to be reorganised to avoid some ugly and repetitive code.
In the meantime, we've opted for the simpler solution of disallowing reflection and just using duplicate reflected copies of *.svg images as needed. Just let us know which images you'd like reflected and we'll add them.
Regards,
Cameron
Our image generation code has undergone some changes in preparation for the upcoming Ludii web player and reflection was one of the casualties.
We've written our own SVG rendering code that reads the *.svg file for each piece, manipulates the colours according to its owner, then renders the shapes to a BufferedImage image suitable for all platforms. Any transforms have to be applied during the render; rotation is not a problem but having to reflect a rotated image during rendering, while juggling between coordinate systems, became too much of a headache (note that we don't support SVG transforms, any transformation has to be manually applied). It's doable but will require our SVG rendering code to be reorganised to avoid some ugly and repetitive code.
In the meantime, we've opted for the simpler solution of disallowing reflection and just using duplicate reflected copies of *.svg images as needed. Just let us know which images you'd like reflected and we'll add them.
Regards,
Cameron