Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - TransBmp() query

TransBmp() query

A PocketC native palm library offering native forms and assorted utilities

Postby Mikael on Tue Jan 06, 2004 8:34 pm

Can anyone tell me why the this works:

@cid "Tran";
@ver "1.0";
@dbname "Trans";
@name "Trans";
@cmd "par a Trans.prc Background.prc";
library "PToolboxLib"
main(){
SetDepth(8);
graph_on();
ClearBuf();
FastBmp(55,55,3000);//a 16 x 16 smiley
FastBmp(75,75,3001);//a 16 x 16 black square
wait();
}

but not this:

@cid "Tran";
@ver "1.0";
@dbname "Trans";
@name "Trans";
@cmd "par a Trans.prc Background.prc";
library "PToolboxLib"
main(){
SetDepth(8);
graph_on();
ClearBuf();
TransBmp(75,75,3001,3000);
wait();
}

After reading the TransBmp info dozens of times, I'm under the impression that I should be defining a black hole (3000) and laying my .bmp(3001) on top of it - or, if the index is -1, the .bmp gets put on top of the existing image or background. I've also tried that without sucess. All I get is a blank screen.
This is related to the PToolbox 'graphics.c' sample program where I noticed that both the overlay and mask are set to 5 when TransBmp is called:

//draw
TransBmp(x_pos[0],y_pos[0],5,5);
TransBmp(x_pos[1],y_pos[1],5,5);
TransBmp(x_pos[2],y_pos[2],5,5);

This confuses me. I can't imagine that the image is being drawn on top of itself, so does it then mean that 2 different images are sharing the same index?

Thanks in advance,

Mikael
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby cable_guy_67 on Tue Jan 06, 2004 10:59 pm

All Quotes are from PtoolBoxLib Docs.

from FastBmp():
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">If no bitmap database is opened, then the application .prc is file itself is searched for bitmaps. In this case the mode is "load-on-demand".<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

from TransBmp():
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Note: TransBmp only works in "lock&load" bitmap mode (see OpenBmpDb for more details on this mode).<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

I have not used it like this but what if you were to call:

@cid "Tran";
@ver "1.0";
@dbname "Trans";
@name "Trans";
@cmd "par a Trans.prc Background.prc";
library "PToolboxLib"
main(){
SetDepth(8);
graph_on();
ClearBuf();

OpenBmpDb("Trans");

TransBmp(75,75,3001,3000);//So I gather from below use (75,75,1,0)?
wait();
}

Might that turn the trick?
cable_guy_67
 
Posts: 92
Joined: Mon Mar 31, 2003 2:28 am
Location: USA

Postby jstadolnik on Wed Jan 07, 2004 12:20 am

TransBmp() doesn't understand resource IDs. You need to use the index of the bitmap instead, which in turn requires your bitmap database (which may be your app itself) to opened in lock&load mode with OpenBmpDb().

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby Mikael on Wed Jan 07, 2004 2:12 am

Thanks guys,
That did the trick. I see where I was going wrong now.

Mikael
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark


Return to Pocket Toolbox

Who is online

Users browsing this forum: No registered users and 2 guests

cron