These old devices do represent a challenge.
But since idoit also wants things for his (2.5.8) DXG ...
- - - -
If we only need Cairo - the binding library I gave earlier is the better (and maintained) one.
http://www.dynaset.org/dogusanh/
- - - -
Of most interest are the worked examples in: oocairo.orig.tar.gz