transparency

colin9876

Active Member
Licensed User
Writing some code now, 1st game where man has to jump onto a swinging rope.
Rope code is something like
For angle= -2 to 2 step .1
Line (120,120, 100*(1+sin(angle)),100*(1+cos(angle)),cBlack)
Next
..etc...

Obviously the rope leaves a trail of where it was before. Rather than drawing over the previous line in the background colour I wanted to try the
SetTransparencyColor function and then draw it to the foreground (I saw it was done like this in the clock program.)
What do I have to do to make this happen?

I tried SetTransparencyColor=CBlack, and put a ,f) at the end of the line command but it didnt make any difference. Do I specifically have to clear the foreground somehow before I redraw my rope.

I hope my question makes sense? Grateful for any help
 

colin9876

Active Member
Licensed User
I see actually that the clock prog does clear a circle every tick, so what my question is ....
1) How does transparency funtion work & What happens when you settransparencycolor

2) Also I know how to do a line [form1.line(....] but cant work out how to do a point [tried form1.plot and form1.point] can someone tell me the keyword please?
 

colin9876

Active Member
Licensed User
Thanks - this Basic4PPC really is good - except Ive found one prob I will have to work round ...
....I had my program DrawRope which twirled a rope round BUT I didnt see it till it had got to the end of the Sub. That is to say that the screen didnt refresh all the time the rope was moving - so I only saw the rope in the end position!!

Is that ususal for PocketPCs to only update the screen at the end of a proceedure or is this an issue with Basic4PPC ???

OK I could get round this by having the rope move each step by a TimerClick but is there anyway to force a screen refresh in the middle of a drawing loop?
 

colin9876

Active Member
Licensed User
great thanks - last question.
:sign0188:
Im using a HTC VGA Universal, but it plots to the screen as if its only 320x240.
I tried going into the form and changing the property dimensions but I couldnt edit those boxes.

1) How do I make a program findout if the screen is VGA?
2) How do I then do line(0,0,640,0, ..) etc
 
Top