This article accompanies the fable
Casanova's and Venice's libertinism did not emerge from a vacuum. I Modi (aka "The Positions") is a notorious book of erotica that became famous in 16th century Italy as much for being banned as for its racy content. After the Church destroyed early versions in Rome in 1524, within three years copies were in discreet circulation, but the copies again were systematically tracked down and destroyed and almost nothing survives.
While the illustrations were graphic, the key figure behind its success was the influential poet and playwright Pietro Aretino, who wrote the sonnets that accompanied the pictures. Such sonnets and pictures would have been circulating privately in Casanova's Venice.
The illustration immediately below is from a French edition of Aretino's sonnets published in 1798. The artist is unknown but Wikipedia suggests Agostino Carracci, back in the 16th century.
The irony, of course, is that Aretino was gay. The early portrait below is by his friend, Titian, around 1512. It is an amazing painting.