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 - Pocket Toolbox functions on WinCE

Pocket Toolbox functions on WinCE

Discuss PocketC for CE (including Desktop Edition)

Postby jwdcs on Wed Feb 14, 2001 8:49 pm

Does anyone have WinCE code similar to those
on Palm OS (and Joseph Stadolnik's Toolbox:

bitmap(int x, int y, string bitmap_string) -
from a string instead of a file
tbitmap(int x, int y, string bitmap_string) -
transparent bitmap


Screen buffer functions:
SetDrawBuf(int buffer)
ClearBuf()
CopyRect(int src_buf, int dest_x, int dest_y, int src_x, int src_y, int width, int height, int mode, int zoom, int rotation)
jwdcs
 
Posts: 2
Joined: Wed Feb 14, 2001 8:41 pm
Location: USA

Postby psychic_treason on Sun Feb 18, 2001 10:39 pm

This is indeed a problem that I encountered several weeks ago.

Basically there are no functions that do this at the present time. From the discussion I had, it seems like the only way we would get them is to code it into a COM abject and use it that way.

It seems as though no one has enough time on their hands to go about producing COM objects to do this though.... I know I don't.

-- http://www.talent2.net --
psychic_treason
 
Posts: 12
Joined: Thu Feb 01, 2001 12:52 pm
Location: United Kingdom

Postby jwdcs on Tue Feb 20, 2001 1:51 pm

Thanks. I actually have now implemented them. Not the fastest code I'm sure, but
COM is not something I know anything about.
My bitmap() erases the rect, then calls
my tbitmap():

tbitmap(int x, int y, string bits) // from PToolboxLib for Palm OS
{ int i, len, x0, bitmapwidth, pixels;
x0=x;
bitmapwidth=16*hex2dec(strgetc(bits, 0)) + hex2dec(strgetc(bits, 1));
len=strlen(bits);
for (i=2; i<len; i++) {
pixels=hex2dec(strgetc(bits, i));
if (pixels>=8) SetPixel(x, y); // turn 1st pixel on
if ((pixels>=4 && pixels<=7) || pixels>=12) SetPixel(x+1, y); // turn 2nd pixel on
if (pixels==2 || pixels==3 || pixels==6 || pixels==7 || pixels==10 || pixels==11 || pixels==14 || pixels==15)
SetPixel(x+2, y); // turn 3rd pixel on (when n=2*odd or n=(2*odd)+1 )
if (!even(pixels)) SetPixel(x+3, y); // turn 4th pixel on
x=x+4;
if (x>=x0+bitmapwidth) { x=x0; y++; }
}
}

For SetDrawBuf() and CopyRect(), I implemented just 1 offscreen buffer, as an array int buf[2560] and I use bit operations to set/get pixel settings in it for the single 240x320 buffer. My CopyRect() currently only implemented mode=0, no zoom or rotation, since this is all I need.
I've implemented drawrect(), frame(), frame2(), tbitmap(), bitmap() to work with either buffer 0 (screen) or 1 (offscreen buffer).
But not yet line(), ellipse(), etc...which I may need to do. If anyone ever does a COM version, which I assume would be faster, please let me know!
jwdcs
 
Posts: 2
Joined: Wed Feb 14, 2001 8:41 pm
Location: USA


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 1 guest

cron