I tried to create a Radial Progress Bar: http://www.maxprog.com/misc_6398/xojo/Radial_ProgressBar.zip
It works but it is ugly, I am posting that in case somebody knows how to enhance that…
It is ugly on a regular Mac and a real shame on a retina display… :-/
Not really, what you have posted is cool (not 100% clean on Retina displays by the way).
I need a simple radial, because of the size, it will be less than 16x16. Similar of what iTunes displays when you purchase a song and it is being downloaded.
Toss all the DrawLine and While Loops and use a single ARCSHAPE…
That should even be Retina ready as-is (I think)
Here’s a quick version using arcshape and a 2x buffer… should look nice on retina (I don’t have a retina display though so untested)
Radial Progress Bar
You may want to use the oval overlay workaround described at https://forum.xojo.com/11615-arcshape
Draw a white circle, then your arcshape, then draw an oval over the circumference…
You could also create a series of 20 or 30 pictures and just drawpicture those. No vector fuss and the image is whatever you animate.
But then you’ll need 40 - 60 images (for non-retina and retina)
Even though space is cheap these days, that still seems kind of silly
60 16x16 images can be prepped in a single 16x960 image, and 32x1920 for 2x. Pros: image is wysiwyg and can be generated with whatever, cons: extra 50-300k and less value range.
Then what if you need a 512*512 version? or a red one, a blue one and a green one? etc etc…
Ironically, Apple often use images for their custom progress bars… Which is as most agree, not the best solution! Especially when they ‘advise’ developers to use vector graphics where you can!
Jim, the result is great, and code is very compact. Brilliant.
Thanks, I suspect that for retina you may need a 4x buffer picture…
No, I tested your code on Retina and it is just perfect. At least for me. Brilliant!
Gee Dave… thanks for the wonderful idea…
Yes, thanks Dave. I’m still learning new things everyday! I had been messing with arcshapes due to this thread (I didn’t see your post until I was posting the example…)
[quote=86597:@jim mckay]Here’s a quick version using arcshape and a 2x buffer… should look nice on retina (I don’t have a retina display though so untested)
Radial Progress Bar[/quote]
As an aside - for those of us using older RS / Xojo versions, this works fine all the way back to 2012r2.1.