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 - Color plots
Page 1 of 1

PostPosted: Sun May 13, 2001 1:40 am
by jfield
I cannot get color to work on my Palm IIIc. I'm using Pocket Toolbox 6.01. Below is the program:

// plot example
//draws a sharp triangle
#define PI 3.14159265
library "PToolboxLib"
main(){
int x,y,d,sd,pc,c,sf,sb,gp,i;
//mode = radius + width + point/line
int mode0=0x03030000;
int mode1=0x03030001;
float phase_offset;
// controls dir. of the sharp point
d=5; i=2;
graph_off();
sd=SetDepth(5);
puts(" SetDepth1: " + sd + "\n");
pc=PickColor();
puts(" PickColor1: " + pc + "\n");
sf=SetFore(pc);
puts(" SetFore1: " + sf + "\n");
sf=SetFore(pc);
puts(" SetFore2: " + sf + "\n");
pc=PickColor();
puts(" PickColor2: " + pc + "\n");
sb=SetBack(pc);
puts(" SetBack1: " + sf + "\n");
sb=SetBack(pc);
puts(" SetBack2: " + sf + "\n");
graph_on();
sd=SetDepth(5);
puts(" SetDepth2: " + sd + "\n");
waitp();
x=penx(); y=peny();
SetPixel(x,y);
gp=GetPixel(x,y);
puts(" GetPixel1: " + gp + "\n");
gp=GetPixel(x,y);
puts(" GetPixel2: " + gp + "\n");
phase_offset = 0;
// make triangle point upwards
plot(mode0,x,y,70,phase_offset); //sets up previous point
plot(mode1,x,y,30,2*PI/3+phase_offset);
// draw first line
plot(mode1,x,y,30,4*PI/3+phase_offset);
// draw second line
plot(mode1,x,y,70,2*PI+phase_offset); // draw last connecting line
waitp();
//graph_off();
}

PostPosted: Sun May 13, 2001 3:27 am
by jstadolnik
You need to set the colors after the graph_on() call.

Joe

PostPosted: Sun May 13, 2001 12:36 pm
by jfield
Thanks for the help.

Please add your comment to the Pocket Toolbox 6.01 documentation for SetFore(), SetBack() and SetTextColor(). Also CopyBuf and OpenBufDb are missing from the list of Screen Buffer Functions on page 2, there is a typo on page 7: "color of the for the specified" and there is a typo on page 8: "PtoolboxLib" vs. "PToolboxLib".

Thanks again for the help. Below is the version that worked:

// plot example
//draws point, arc and sharp triangle
#define PI 3.14159265
library "PToolboxLib"
main(){
int x,y,d,pcf,pcb,sf,sb,gp,stc,i;
//mode = radius + width + point/line
int mode0=0x03030000;
int mode1=0x03030001;
float phase_offset;
// controls dir. of the sharp point
d=8;
graph_on();
pcf=PickColor();
puts("PickColorF: " + pcf + "\n");
pcb=PickColor();
puts("PickColorB: " + pcb + "\n");
sf=SetFore(pcf);
sb=SetBack(pcb);
x=40; y=90;
SetPixel(x,y);
gp=GetPixel(x,y);
puts("GetPixel: " + gp + "\n");
phase_offset = PI/2;
// make triangle point upwards
arc(80,90,60,3*PI/2,5*PI/2);
plot(mode0,x,y,70,phase_offset); //sets up previous point
plot(mode1,x,y,30,2*PI/3+phase_offset);
// draw first line
plot(mode1,x,y,30,4*PI/3+phase_offset);
// draw second line
plot(mode1,x,y,70,2*PI+phase_offset); // draw last connecting line
waitp();
}