Linux graphics for Windows programmers??

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Linux graphics for Windows programmers??

Schwab,Wilhelm K
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


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Linux graphics for Windows programmers??

Bert Freudenberg
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Linux graphics for Windows programmers??

Schwab,Wilhelm K
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: [hidden email] [mailto:[hidden email]] On Behalf Of Bert Freudenberg
Sent: Friday, April 16, 2010 1:40 PM
To: The general-purpose Squeak developers list
Cc: [hidden email]
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Linux graphics for Windows programmers??

Bert Freudenberg
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: [hidden email] [mailto:[hidden email]] On Behalf Of Bert Freudenberg
> Sent: Friday, April 16, 2010 1:40 PM
> To: The general-purpose Squeak developers list
> Cc: [hidden email]
> 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
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Linux graphics for Windows programmers??

Schwab,Wilhelm K
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: [hidden email] [mailto:[hidden email]] On Behalf Of Bert Freudenberg
Sent: Friday, April 16, 2010 2:43 PM
To: [hidden email]
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: [hidden email]
> [mailto:[hidden email]] On Behalf Of Bert
> Freudenberg
> Sent: Friday, April 16, 2010 1:40 PM
> To: The general-purpose Squeak developers list
> Cc: [hidden email]
> 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
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project