Guod3
02-23-2011, 08:07 PM
As part of a midi visualisation plug, I am designing animated glyphs using variant of IBitmapControl, call it IBitmapGlyphControl .
The glyph animation is triggered by passing a normalised value to it in ProcessMidiMsg()
with GetGUI()->SetControlFromPlug(GlyphIdx,CntlVal)
Now the glyph animates frame by frame until completion.
Is it the Draw method of IBitmapGlyphControl that calls SetDirty(true) so that it gets redrawn the next frame?
The intention is that Draw gets called whether or not the frame needs to change so that the glyph can control the progression of frames i.e Speed up by skipping bitmap indeces, slow down by not progressing bitmap index every frame etc.
When the animation has completed all the frames, it leaves the last index active, and does not call SetDirty(true) so that the endframe does not change (and is redrawn as required by closing/opening the window etc.)
Does this sound like a valid approach?
The glyph animation is triggered by passing a normalised value to it in ProcessMidiMsg()
with GetGUI()->SetControlFromPlug(GlyphIdx,CntlVal)
Now the glyph animates frame by frame until completion.
Is it the Draw method of IBitmapGlyphControl that calls SetDirty(true) so that it gets redrawn the next frame?
The intention is that Draw gets called whether or not the frame needs to change so that the glyph can control the progression of frames i.e Speed up by skipping bitmap indeces, slow down by not progressing bitmap index every frame etc.
When the animation has completed all the frames, it leaves the last index active, and does not call SetDirty(true) so that the endframe does not change (and is redrawn as required by closing/opening the window etc.)
Does this sound like a valid approach?