adaptation of the rsvg lib