[fxruby-users] FOX/FXRuby FXDCPrint bugs

Gonzalo Garramuno ggarra at advancedsl.com.ar
Tue Aug 16 19:07:02 EDT 2005

Not sure if this is the proper place for reporting bugs, but here they go...

I've just been trying FXDCPrint and I actually found that, for the most part, it kind of works for postscript output.   You need to setContentRange before hand, else, you just get NaNs everywhere.  It isn't exactly clear to me why setting this is needed.

Then, I found that FXDCPrint's font method (ie. getFont) returns nil, instead of the current font.

Another problem that the drawText function does not respect fonts, such as Times.
It seems FXDCPrint is largely based (or is very similar) to C++ code written by Dimitris Servis.  In his code, however, his drawText function clearly distinguishes among some basic fonts (times, helvetica, courier, etc), at least in his latest version.  The current FOX that comes with FXRuby does not do this.

FXDCPrint's lineWidth method is not setting line widths properly (it just takes the values as is, instead of multiplying by the scaling factor of the page).  This leads to any line size that is bigger than the default (ie. 2, 3, etc) to look extremely thick.

Finally, if FXDCPrint is called with an FXPrinter with printer settings set to print to page, a segfault will happen.  This is also different from what happens in Dimitris code, where the postscript file gets piped to 'lpr' instead.

Overall, most of these things are minor fixes to what is currently there already and with that, it would make FXDCPrint pretty usable for most things.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20050816/b83d4e40/attachment.htm

More information about the fxruby-users mailing list