Graphical widgets
Graham Stabler
Posts: 2,510
I'm using graphics.spin for the menu system of my all purpose experiment controller, this unit triggers cameras, rotates stepper motors and generally does all the things required in a number of experiments/instruments.
For one of the experiments an object is rotated and pictures are taken of it at a variety of angles, so I made a little vector sprite of a pointer and a tick, the program now shows a pointer rotating around past the ticks that are located every 10 degrees or so. It struck me the functionality could be generalized into a function that draws a clock and adds the pointer at the required position.
Such generalized functions could form a set of useful graphical widgets to be incorporated into programs, things like progress bars are very simple and there are many other possibilities.
Anyone else done anything like this?
Graham
For one of the experiments an object is rotated and pictures are taken of it at a variety of angles, so I made a little vector sprite of a pointer and a tick, the program now shows a pointer rotating around past the ticks that are located every 10 degrees or so. It struck me the functionality could be generalized into a function that draws a clock and adds the pointer at the required position.
Such generalized functions could form a set of useful graphical widgets to be incorporated into programs, things like progress bars are very simple and there are many other possibilities.
Anyone else done anything like this?
Graham
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
I think "Graphics" uses a lot of resources though.· It may be better to do it as 4-color tiles.· Still, it would be difficult to do an analog meter or clock face with tiles...
Also, M$ has some kind of Robotics SDK that I was looking at a while ago. I think this was geared toward the Lego Mindstorms, but it could also probably be applied the the Propeller I think...
Using one of these tools, one could make a Propeller based control system that intefaces with a PC in a more advanced way...
I like the idea. I hope you and others will share premade GUI widgets with us.
Ken,
What touch screen are you using?
- Sparks
Graham
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
Graham