From: Jan S. <jan...@cs...> - 2007-04-06 06:22:15
|
Dear Al, I guess it has been a while since you've heard from me :-). I just wanted to let you know that I've added some code to the GLE interface to make rendering text to postscript possible, to get the list of available fonts, etc. Currently, text objects from a script are not yet passed to QGLE, but this should be enough to create the interface for adding new text objects and placing them with the mouse. I've added some testing code for this in "mainwindow.cpp", starting with the line "// DEMO OF FONTS". This should of course be removed later on. It was just for a quick check. The code first lists the available fonts and indicates for each font which styles are supported (Roman, Italic, Bold, Bold+Italic). Then it creates a new font properties object setting the font "rm", size 0.35, roman style. Based on these properties it subsequently creates a new text object with the string "Hello World!". It then prints the size of this text object in cm. Finally, it also prints the corresponding PostScript code. The idea is that this is passed to the GhostScript library to create a transparent bitmap of the object, which can then be positioned in the drawing. This is more or less a very high level description of what it does. Could you let me know if I have overlooked something? There is no rush as I have still plenty of things to do, like adding properties for regular objects, such as the line width and color of lines, circles, arrow heads,... Btw: So far, I've only tested this on Linux. Best Regards, Jan. |