Render TEXT* into bmap

Posted By: TrackingKeks

Render TEXT* into bmap - 04/26/10 17:02

Hi!
Is it possible to render a TEXT* object into a bmap?
I think it has something to do with target_map but I don't know how to use it blush !
Thanks for your help!
Posted By: Razoron

Re: Render TEXT* into bmap - 04/26/10 17:07

Maybe like this:
Code:
PANEL*pnl
{....}

TEXT*txt
{....}

txt.target_map=pnl.bmap;


Posted By: TrackingKeks

Re: Render TEXT* into bmap - 04/26/10 17:27

OK, thanks. But after trying to write the target_map in a file it contains the bmap of the panel.
What is wrong with my code?

Code:
BMAP* rendermap = "#1024x768x32";
test_txt.target_map=effekt_pan.bmap;
wait(1);
	
bmap_blit (rendermap,test_txt.target_map, NULL, NULL);
bmap_save(rendermap,"result.bmp");


Posted By: Razoron

Re: Render TEXT* into bmap - 04/26/10 17:35

I hope you decleared a panel before.
Code:
BMAP* rendermap = "#1024x768x32";
PANEL*effekt_pan={...bmap=rendermap)
test_txt.target_map=effekt_pan.bmap;
wait(1);
	
bmap_blit (rendermap,test_txt.target_map, NULL, NULL);
bmap_save(rendermap,"result.bmp");


Posted By: TrackingKeks

Re: Render TEXT* into bmap - 04/27/10 05:59

Thanks for your help!
Yes, of course I have defined a panel but the TEXT* wasn't visible at this time. After setting the SHOW flag everything works fine.
© 2023 lite-C Forums