1. RE: Re[4]: copyToBitmapFile

Ah!  Thank you so much!  I'll definitely be adding the setFont and 
setTextColor stuff...I want this to be as configurable as possible.  
This was one of those troubling little problems that keeps a person up 
all night, you know? :).  My goal is to release this to the people on 
the Winamp message boards (and to the EU peoples :) ).  A group of crazy 
Winamp people had a server going called WinampDB, that was doing the 
same thing as my program, but centrally, using a php script and the 
minibrowser from Winamp.  It got so much use that they had to shut it 
down because they were giving away too much bandwidth.  I'm hoping that 
my program (when its more finalized) will be able to fill in until they 
put WinampDB back up or if it doesn't come back, just plain replace it 
;) .

Thanks again,
Cassidy

p.s.  In the near future I'll probably be picking your brain over your 
XML library.  Winamp3 is really heavy on the XML (db, skins, configs, 
etc.), and I'd like to make a skinning editor for it.

Thomas Parslow (PatRat) wrote:
> > Win32Lib is choking.  Here's the complete program:
> > [begin code]
> <snip>
> > [end code]
> 
> Ah, you're using a label to display the text, didn't think of that (I
> have no idea why not, really should have :). Anyway, you can place
> text on a pixmap using the wPuts() function (see the Fonts section in
> the win32lib doc).
> 
> I've attached a working copy of the program, basically all I've done
> is:
> * Comment out the PixLabel line
> * Add the following lines to makeImage (and the declaration of the
> size variable as a sequence):
>         --...could use setFont and setTextColor on songPix here...
>         --Get the size that the text will take up, you could just set size to
>         a
>         constant if you want the bitmap to always be the same size
>         size = getTextExtent(songPix,s)
>         --Set the pen color to a good background color (i'll use white)
>         setPenColor(songPix,White)
>         --Erase whatever is currently in the pixmap
>         drawRectangle(songPix,1,0,0,size[1],size[2])
>         --Set the position to write text at
>         setPenPos(songPix,0,0)
>         ---Write the text to the pixmap
>         wPuts(songPix,s)
> * Changed the copyToBitmapFile line in makeImage to use the sizes
> found using getTextExtent()
> 
> Hope it makes some sort of sense :)
> 
> Thomas Parslow (PatRat) ICQ #:26359483
> Rat Software
> http://www.rat-software.com/
> Please leave quoted text in place when replying
> 
>

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu