Page 1 of 1
rotate a bitmap about it's centre
Posted: Tue Oct 11, 2011 9:29 pm
by nimbusgb
trying to rotate a bitmap of a compass card around its own centre.
Any pointers would be appreciated!
Re: rotate a bitmap about it's centre
Posted: Wed Oct 12, 2011 6:49 am
by nimbusgb
might have sorted some of it but i need to calculate the centre of the plotted bitmap. If the gui display is resized then the centre of rotation moves and things go wrong.
I have attached a copy of my display but not sure if that encapsulates the bitmaps??
It should display this

Can I just add how blown away I am at this! What a cracking piece of software! The manuals could do with a bit of work, working out where to put things like the redraw of a bitmap is mostly trial and error but 2 days ago I had not heard of Flowstone and in one evening I produced a working compass display, got a feed from a com port going, filtered out a csv stream and can control my display from a piece of hardware.
Excellent! I'll certainly be spreading the word to some of the user groups I am in!
Re: rotate a bitmap about it's centre
Posted: Wed Oct 12, 2011 10:06 am
by Morph
Looks good!
To optimize the redrawing a bit you can change the Redraw primitive to a Redraw Area to make the redraw area as small as possible. Also using a Float Changed can reduce triggers when triggers are sent without changing value.
Re: rotate a bitmap about it's centre
Posted: Thu Oct 13, 2011 12:41 am
by fixstuff555
Well done.
I have to say that's one of the best looking graphic bitmaps I've seen on these forums.
Re: rotate a bitmap about it's centre
Posted: Thu Dec 22, 2011 11:03 pm
by horaceoz
good work on the compass
used this with the phidgets 3/3/3 for spatial info for my Land Rover
does anyone know how to use the 3 axis compass readings to allow pitch and roll compensation?
Re: rotate a bitmap about it's centre
Posted: Fri Dec 23, 2011 12:30 am
by Embedded
Depends what it is your controlling. But it will involve using the PID module to give nice progressive results.
Re: rotate a bitmap about it's centre
Posted: Fri Dec 23, 2011 12:39 am
by horaceoz
At the mo I am using the yaw for compass heading for testing but I would like to use the compass data