Moving Lines


saboteur

Member
Joined
Nov 17, 2005
Messages
172
Anybody point me to a sample or tell me how I can plot a line then move it ?

Eventualy I want to be able to plot a wireframe 3d image and rotate it, but I cant quite figure how this is done in feenix.

Also if anyone can point out how to display a .png and move that about then that would be cool too.

Cheers
 
There are many ways. You could assign the PNG to the graph of a variable for example.

Or you could store the x and y co-ordinates in variables and each frame, clear the screen and re-blit the image at the new co-ordinates.
 
Thanks for the reply sam

so basically :

start loop
change colour to background
plot old line
change colour to foreground
plot new line
frame
loop

does this get flickery ??

Incidentaly - I don't really understand the colour settings for lines - my app is black and white anyhoo.

I'll give it a go anyhoo and post my code.

cheers
 
You could just try draw_line command in Fenix, which lets you draw a line from point A to B.
To change the color of the line, use drawing_color(rgb(r,g,B));
Use delete_draw(0) to get rid of old draws.
 
Sorry to appear completely dumb but I'm really not getting this.

Forgetting lines for now ( I can plot them fine, getting them moving is causing a problem ) I thnk I can do what i need by creating the image as a .PNG and then moving this about.

Any body got some GP2x source thay want to share for placing and moving graphics real time ?? I have no need for user interaction - it's just a hands off demo.

Feenix is really usefull, but man it's tough without examples :)

As a plus i've got a background image and can place text where i want it

Thanks for everyones help and I hope i'm not p****** anyone off.

Cheers
 
Is it possible to use a PNG as a sprite ?? Do you use MAP commands tu utilise it ??

I'm getting hung up on this ( most examples use FPG )

Cheers
 
Is it possible to use a PNG as a sprite ?? Do you use MAP commands tu utilise it ??

I'm getting hung up on this ( most examples use FPG )

Cheers
 
Is it possible to use a PNG as a sprite ?? Do you use MAP commands tu utilise it ??

I'm getting hung up on this ( most examples use FPG )

Cheers
 
Is it possible to use a PNG as a sprite ?? Do you use MAP commands tu utilise it ??

I'm getting hung up on this ( most examples use FPG )

Cheers
 
Alex. said:
QPD - Quadruple personality disorder!

Whoa - not sure what's going on there - look at the times of the post's.

Sorry for all that. :)
 
Last edited by a moderator:
Back
Top