Printing SDL_Surface

Hi. I’ve just switching from Windows XP to Linux Fedora Core 5. I needed
my code to print the images and strings (from the SDL_ttf). I know that to
print in Linux, first I needed to make a PostScript file and print the
file with CUPS. My question is, how do I make a ps file from the
SDL_Surface? Can the True Type Font that I use in the Surface be printed
not as a surface, but an independent string? Is there any library that can
help me with this?

Thanks a lot in advance.

PS: How do I get out of the maillist’s digest and get the usual
’undigested’ email? It’s hard to read from the digest.

I know that to
print in Linux, first I needed to make a PostScript file and print the
file with CUPS. My question is, how do I make a ps file from the
SDL_Surface?

If you save you surface as a BMP or PNG, you can use
ImageMagick’s convert (or a plenitude of other tools) to
convert to PS. But as far as I know, CUPS provides filters
which do such conversions automatically for many common
types of files (and you can define your own), and I’m pretty
sure you’ll get away with just feeding a BMP or PNG to CUPS.

PS: How do I get out of the maillist’s digest and get the usual
’undigested’ email? It’s hard to read from the digest.

Go to

http://www.libsdl.org/mailman/listinfo/sdl

At the bottom of the page, enter your subscription email
address, press Enter, then enter your password, press Enter,
then in the options (scroll down), set “Set Digest Mode” to
"Off".

HTH,
OlegOn Fri, Aug 11, 2006 at 09:51:08AM +0700, benang at cs.its.ac.id wrote:

Hello !

Hi. I’ve just switching from Windows XP to Linux Fedora Core 5. I needed
my code to print the images and strings (from the SDL_ttf). I know that to
print in Linux, first I needed to make a PostScript file and print the
file with CUPS. My question is, how do I make a ps file from the
SDL_Surface? Can the True Type Font that I use in the Surface be printed
not as a surface, but an independent string? Is there any library that can
help me with this?

Look at Tuxpaint http://www.newbreedsoftware.com/tuxpaint/ they are
realising printing SDL Surfaces on Linux, Windows and Mac OS X.

CU

Sorry, I forgot to mention that ImageMagick is a library
with API, which does everything that the command-line tools
do.

OlegOn Fri, Aug 11, 2006 at 09:42:01AM +0300, Oleg Katsitadze wrote:

If you save you surface as a BMP or PNG, you can use
ImageMagick’s convert (or a plenitude of other tools) to
convert to PS.

Sorry about the general nature of this question - I haven’t gotten very far
with Google. I have been working on Bill Kendrick’s game “Tux, of Math
Command” aka “Tuxmath” and I want to make a Windows build. I have install
Cygwin and have tried to get the SDL libs set up but I have not gotten
SDL_image to build under Cygwin - the errors say that headers are missing for
jpeg and maybe some other image formats - I would provide more details but I
am posting from my home (Linux) machine. I am pretty sure that the code of
Tuxmath itself contains little if anything that is platform-specific, but I
need a functioning SDL Windows build environment.

Is Cygwin + SDL the right way to go to make a Windows package, and can anyone
point me to a way to get SDL_image installed under Cygwin? Alternatively, I
would be happy to cross-compile for Windows using my Debian system, but I
have found even less info through Google on how to do that.–
David Bruce

Hi David,

Is Cygwin + SDL the right way to go to make a Windows package, and can anyone
point me to a way to get SDL_image installed under Cygwin? Alternatively, I
would be happy to cross-compile for Windows using my Debian system, but I
have found even less info through Google on how to do that.

I used the gcc cross-compiler from Linux. Then I switched to using the
Visual C++ command line compiler (free-as-in-beer) with Wine and it
works great. This is what gives you highest compatibility with most
Win32 libs (g++ has trouble linking with C++ libs made with VC++ because
of different name mangling), so you can develop for Direct3D for
example.

I also use the Nullsoft installer (NSIS), its command line compiler also
works great in Wine.

BTW, I have a small python script that converts g++ style command line
args to what cl.exe expects, I can send it to you if interested.

    --Gabriel________________________________________________________________________

Gabriel Gambetta
Mystery Studio - http://www.mysterystudio.com
Gabriel on Graphics - http://gabrielongraphics.blogspot.com