On Mon, Jun 16, 2008 at 4:43 PM, William Rutiser <wruyahoo05 at
comcast.net>
wrote:
> I am working on a program which constructs simple graphic diagrams which
> need to be printed. Currently, I am drawing on an FXCanvas, doing a screen
> capture of the window with ALT-PrintScreen, pasting the bitmap into MS
> Paint, and printing from there.
>
> The documentation for FXPrinter, etc seems pretty thin and I
haven''t found
> an example or demonstration for its use tho I did find a couple of archived
> emails that suggest it may be limited, particularly on Windows.
yeah, you are not the first to discover that FXPrinter is useless.
>
>
> I am using Ruby 1.8.26, FXRuby 1.6.14, and Windows XP SP3
>
> How do other applications, *nix or Windows, handle printing?
>
> Is there anything in FxRuby or elsewhere that can be used to directly
> capture the canvas pixels in a form that can be exported in a useful file
> format?
just a random thought: you could instead of using drawing operations on
FXCanvas use one of the wonderful svg libs from RAA to construct a svg
drawing then render it using image magick (or inkscape) to render any image
file you want and draw that to your FXCanvas or send it to a printer.
I have used imagemagick successfully on both windows and linux.
hth,
-- henon
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/fxruby-users/attachments/20080616/22d3ea4d/attachment.html>