Although I may not have a flashy FP to show at this moment, I think I have you all topped out for working w/ the picture control.
I'll try to keep this short but I'm really e *** d to talk about it so we'll see how it goes.
It all started w/ needing to stream a picture from a frame grabber to the front panel on a really crappy PC.
Taking the data as an array of u8 and doing the conversion w/ the LV VIs and redrawing for each frame was really slow, about 8fps.
I couldn't use the vision toolkit as it needed to be platform independent.
Solution: Totally disect framework of the picutre control on a byte level (flatten to string), do a repace on the existing string w/ the new data from the camera(inplace function(no new memory)), and then do a concantenate string w/ a blank picture and redraw to the picture control
Result: over 45fps
All that disection....wait let me explain what disection meant
Disection(verb): Opening up every LV picture VI, seeing how the data is structured within each picture type and its appropriate opCode, and then keeping track of each element that was drawn on a picture control so thatt if I needed to modify, say the color of a line amidst 200 lines. I didn't need to redraw all 200 lines w/ 1 haveing the new color, I would just recall the location in the byte stream of where the the line is and the color for that specific line was stored and then change it to the appropriate value.
ex: Picture control framework [32 bits defining total size of following data for entire control][16 bits: opCode(picture part)][32bits: size of data for specific opCode][data of opCode]REPEAT last 3 for every part in control
opCode:NAME4: set pixel5: Pen move 6: Pen Move to7: Line8: Line to16: Poly-Line17: Fill Poly41: Select Pen10: Rect Fill9: Rect Frame15: Gray out Rect25: Round Rect Fill24: Round Rect Frame12: Oval Fill11: Oval Frame14: Arc Fill13: Arc Frame18: Text Box31: New Font29: Copy Pixmap40: Copy PIxmap w/ maskThe long and the short of it, is that because NI has left the structure of the picture control open, we are free to create our own tools to push the control to the limits. If I was ever able to create a tool that showed handles on individual items that were drawn already, using these techniques you could do a 'free transform' on something like a triangle poly, and move individual joints aoround.
I've got way more to say but I've gone on too long alreday. oooh Wait I've got Pictures too
~,~ The Captain Was Here
Norm KirchnerCLD (Certified LV Dancer)
picureCtl-inplace-replace.jpg:
http://www.yqcomputer.com/
picureCtl-recolor.jpg:
http://www.yqcomputer.com/