Printing alternatives with FXRuby

View: New views
2 Messages — Rating Filter:   Alert me  

Printing alternatives with FXRuby

by William Rutiser :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

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?

Thank you for any advice or suggestions, however incomplete.

Bill Rutiser
_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users

Re: Printing alternatives with FXRuby

by Meinrad Recheis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jun 16, 2008 at 4:43 PM, William Rutiser <wruyahoo05@...> 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

_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users
LightInTheBox - Buy quality products at wholesale price