Le 31/12/2022 à 01:13, Paolo Prete a écrit :
I'll examine it, thanks.
Meanwhile, I don't know if it is the right case, but it comes to my mind a hack, which I applied on some similar code:

Before the SVG bytestream is emitted by the write_func, I would set a temporary, special and different _color_ for each grob that is associated with output-attributes. This color is automatically generated and must obviously be different from any other color that will be included in the output SVG. Then you can create a map with key = specialcolor, value = pair (original color,  output-attributes) and when you parse the generated bytestream, if you find any set of objects with a color included in the map, you can group them, set output attributes on the group and restore the original color.

I repeat: this is a hack, it's a bit imaginative and I don't know if it's really suitable for the present case. But the unique color mechanism is much safer than you might think.


Wait, I'm starting to wonder if it's possible via a second surface.

I'll try this, but not guarantees.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to