[Pharo-project] Linux graphics for Windows programmers??
Hello all, Are there any good tutorials that explain the transition from Windows to Linux with respect to graphics (device contexts, etc.)? I am especially interested in frameworks for printing, and wrappers that provide a canvas interface to a printer. I found a copy of Sophie 1.04 that has some code in Sophie-Printing. Is there anything else I should study? Bill
On 16.04.2010, at 20:20, Schwab,Wilhelm K wrote:
Hello all,
Are there any good tutorials that explain the transition from Windows to Linux with respect to graphics (device contexts, etc.)? I am especially interested in frameworks for printing, and wrappers that provide a canvas interface to a printer. I found a copy of Sophie 1.04 that has some code in Sophie-Printing. Is there anything else I should study?
Under Linux, the lingua franca for printing is PostScript. So if you can generate a PostScript file you're almost settled. How to send this to the printer is unfortunately dependent on the environment - you need to make the command configurable, and perhaps make a good guess at a default. PostscriptCanvas is a place to start, but depending on your app's needs might require some fiddling. OTOH, writing PS files from scratch isn't that hard either. - Bert -
Bert, One thing working in my favor is that I am selecting the distribution(s) and would have fairly tight control over the machines. By "the command" is it safe to assume that one would pipe PostScript into gs and then into a spooler? Put another way, if I had a .ps file, I could do all this from a terminal?? If that is true, I am starting to get it. Thanks! Bill -----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Bert Freudenberg Sent: Friday, April 16, 2010 1:40 PM To: The general-purpose Squeak developers list Cc: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] [squeak-dev] Linux graphics for Windows programmers?? On 16.04.2010, at 20:20, Schwab,Wilhelm K wrote:
Hello all,
Are there any good tutorials that explain the transition from Windows to Linux with respect to graphics (device contexts, etc.)? I am especially interested in frameworks for printing, and wrappers that provide a canvas interface to a printer. I found a copy of Sophie 1.04 that has some code in Sophie-Printing. Is there anything else I should study?
Under Linux, the lingua franca for printing is PostScript. So if you can generate a PostScript file you're almost settled. How to send this to the printer is unfortunately dependent on the environment - you need to make the command configurable, and perhaps make a good guess at a default. PostscriptCanvas is a place to start, but depending on your app's needs might require some fiddling. OTOH, writing PS files from scratch isn't that hard either. - Bert - _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
No need to pipe to gs manually. The spooler uses CUPS which invokes GS (unless printing to a PostScript printer). And yes, you can do this from the terminal. E.g. under Gnome you would use gtklp instead of plain lp, which even brings up a nice dialog IIRC. - Bert - On 16.04.2010, at 21:17, Schwab,Wilhelm K wrote:
Bert,
One thing working in my favor is that I am selecting the distribution(s) and would have fairly tight control over the machines.
By "the command" is it safe to assume that one would pipe PostScript into gs and then into a spooler? Put another way, if I had a .ps file, I could do all this from a terminal?? If that is true, I am starting to get it.
Thanks!
Bill
-----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Bert Freudenberg Sent: Friday, April 16, 2010 1:40 PM To: The general-purpose Squeak developers list Cc: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] [squeak-dev] Linux graphics for Windows programmers??
On 16.04.2010, at 20:20, Schwab,Wilhelm K wrote:
Hello all,
Are there any good tutorials that explain the transition from Windows to Linux with respect to graphics (device contexts, etc.)? I am especially interested in frameworks for printing, and wrappers that provide a canvas interface to a printer. I found a copy of Sophie 1.04 that has some code in Sophie-Printing. Is there anything else I should study?
Under Linux, the lingua franca for printing is PostScript. So if you can generate a PostScript file you're almost settled. How to send this to the printer is unfortunately dependent on the environment - you need to make the command configurable, and perhaps make a good guess at a default.
PostscriptCanvas is a place to start, but depending on your app's needs might require some fiddling. OTOH, writing PS files from scratch isn't that hard either.
- Bert -
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Bert, Thanks! The other lingering topic is how to create an image/Form in Smalltalk and draw on it in a C-callable function in a .so. I am thinking of loops over large data sets. It is easy to make the library and call its functions, but I am not sure about passing the form into it. Is there a way to do that with FFI, or is a plugin the only option? Am I perhaps crossing into OpenGL territory? For good or bad, I have never passed a Windows printer HDC into C code, but one could do so. Bill -----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Bert Freudenberg Sent: Friday, April 16, 2010 2:43 PM To: Pharo-project@lists.gforge.inria.fr Cc: The general-purpose Squeak developers list Subject: Re: [Pharo-project] Linux graphics for Windows programmers?? No need to pipe to gs manually. The spooler uses CUPS which invokes GS (unless printing to a PostScript printer). And yes, you can do this from the terminal. E.g. under Gnome you would use gtklp instead of plain lp, which even brings up a nice dialog IIRC. - Bert - On 16.04.2010, at 21:17, Schwab,Wilhelm K wrote:
Bert,
One thing working in my favor is that I am selecting the distribution(s) and would have fairly tight control over the machines.
By "the command" is it safe to assume that one would pipe PostScript into gs and then into a spooler? Put another way, if I had a .ps file, I could do all this from a terminal?? If that is true, I am starting to get it.
Thanks!
Bill
-----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Bert Freudenberg Sent: Friday, April 16, 2010 1:40 PM To: The general-purpose Squeak developers list Cc: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] [squeak-dev] Linux graphics for Windows programmers??
On 16.04.2010, at 20:20, Schwab,Wilhelm K wrote:
Hello all,
Are there any good tutorials that explain the transition from Windows to Linux with respect to graphics (device contexts, etc.)? I am especially interested in frameworks for printing, and wrappers that provide a canvas interface to a printer. I found a copy of Sophie 1.04 that has some code in Sophie-Printing. Is there anything else I should study?
Under Linux, the lingua franca for printing is PostScript. So if you can generate a PostScript file you're almost settled. How to send this to the printer is unfortunately dependent on the environment - you need to make the command configurable, and perhaps make a good guess at a default.
PostscriptCanvas is a place to start, but depending on your app's needs might require some fiddling. OTOH, writing PS files from scratch isn't that hard either.
- Bert -
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (2)
-
Bert Freudenberg -
Schwab,Wilhelm K