1. How do I create a bitmap with text?

Hello,
Is it possible to creat a bitmap and write text on it within EU using 
Win32lib.

What I want to do is get data from database, convert the word retrieved 
into a bitmap and display as bitmap in eugrid thus allowing me to write 
sideways for the column headers.

new topic     » topic index » view message » categorize

2. Re: How do I create a bitmap with text?

Tony Steward wrote:
> 
> Hello,
> Is it possible to creat a bitmap and write text on it within EU using 
> Win32lib.

Yes. Look at the win32lib demo called "bitmaptext.exw"
 
> What I want to do is get data from database, convert the word retrieved 
> into a bitmap and display as bitmap in eugrid thus allowing me to write 
> sideways for the column headers.

This sounds different from writing onto a bitmap. Are you wanting to create a
bitmap from a word? This is done in a similar manner. Just create a PixMap, then
fill it's background color, write your word into it and then save it as a bitmap.
You will have to calculate the size of it using the text extent function.


-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

new topic     » goto parent     » topic index » view message » categorize

3. Re: How do I create a bitmap with text?

> What I want to do is get data from database, convert the word retrieved
> into a bitmap and display as bitmap in eugrid thus allowing me to write
> sideways for the column headers.

I use sideways text in my Graph control. I whipped up this little
number to do the trick. ta-da!!

procedure setFontRotated( integer pId, sequence pFont, integer pSize,
integer pStyle, atom pAngle )
-- pAngle *should* be between 0.0 and 359.9 (it may be negative)

=09pAngle = floor( pAngle * 10 )
=09if pAngle < 0 then
=09=09-- negative angle
=09=09pAngle += 3600
=09end if

=09setFont( pId, pFont, pSize, {pStyle,0,pAngle,pAngle,DEFAULT_CHARSET,0,0,=
0,0} )

end procedure


~Greg

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu