Tgif + embed EPS

While I’m writing a document of GMV, I’ve found that I need to draw boxes, circles, arrows and text on screenshot. I love drawing figures with Tgif, but Tgif isn’t good at handling pixel images (of course, it can import XPM, PNG and other image files, but I’m not satisfied with the result…). The best solution may be:
1. Convert the underlying image to EPS by ImageMagick (the “convert” command)
2. Then import it to a Tgif figure by “Embed EPS File” command
Because ImageMagick does good conversion and Tgif doesn’t touch the embedded EPS itself. However, Tgif doesn’t recognize the size of EPS correctly by default. This is because Tgif calls GhostScript directly and this can be fixed by setting X resource for Tgif:
Tgif.PsToXbm: convert “%s” xbm:-
Tgif.AutoEPSPreviewBitmap: true
This is what I wrote in my ~/.Xresources. Tgif detects the right geometry, and the EPS preview to draw overlying figure is much better than that from GS 🙂
Anyway… I have to go back to documentation 🙁 🙁 🙁

コメントを残す