View Full Version : Image Rotation?
junioreq
11-07-2010, 06:29 AM
I really need image rotation for a project. I have a bitmap that is animated. I want to be able to tip it left and right, with the fulcrum,pivot point on the bottom of the image, right in the center, so i can do something like:
http://stash.reaper.fm/oldsb/434774/rotate.PNG
Any ideas? Is this possible even with some modding?
EDIT: BTW, another control will modify the actual image, as far as what layer in the bitmap its in. It doesn't stay the same, or else I could just attach it to a knob control. So its really, how to rotate an animated control.
~Rob.
sstillwell
11-07-2010, 09:25 AM
Make a ton of bitmaps and stack them vertically and inherit from IKnobMultiControl and override the OnMouse*() methods to make it read-only?
More graphics work, but less coding.
Scott
junioreq
11-07-2010, 10:04 AM
Seems like that would just make it tilt left and right, with a single animation. I want to animate BOTH the width, and the tilt. So I can have it tilted all the way, while still controlling the width.. Thats 2 animations. There's no way i have the brain to do the math to draw it.
Might have to hang this idea up, as I see no way around it.
~Rob.
olilarkin
11-07-2010, 04:43 PM
The math would be dead simple for drawing this directly with iplug. Just get your head around polar-cartesian coordinate conversion.
Oli
sstillwell
11-07-2010, 06:57 PM
Yar, if you're going for something like Waves S1 (that graphic looks kinda familiar... ;) ), then you'd probably inherit directly from IControl and override the Draw() method and just draw the whole thing from scratch...or compute the drawing when parameters change and write it to a bitmap in memory...then just draw the bitmap in Draw().
I do something vaguely similar in Bad Buss Mojo...the central area of the plugin is a custom-draw control (initial code/idea courtesy of Schwa)
Scott
junioreq
11-07-2010, 07:19 PM
ok, yeah, scott you got a good eye ;) And thankfully I do "Just get your head around polar-cartesian coordinate conversion." in my sleep :)
I'll bite the bullet and call this a challenge and try to draw it, Guess there's no time like the present.
~Rob.
junioreq
11-11-2010, 12:56 PM
Somehow I got off track :)
http://stash.reaper.fm/oldsb/436292/PilotShaperGUI.PNG
~Rob.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.